Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
4f432fee
Commit
4f432fee
authored
Oct 12, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #945 from Daetalus/test_readline
Add module "readline" and update CPython test notes.
parents
3769cc3c
65954dde
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
from_cpython/CMakeLists.txt
from_cpython/CMakeLists.txt
+2
-0
from_cpython/Modules/readline.c
from_cpython/Modules/readline.c
+5
-3
from_cpython/setup.py
from_cpython/setup.py
+7
-0
test/CPYTHON_TEST_NOTES.md
test/CPYTHON_TEST_NOTES.md
+1
-3
No files found.
from_cpython/CMakeLists.txt
View file @
4f432fee
...
@@ -123,6 +123,7 @@ add_custom_command(OUTPUT
...
@@ -123,6 +123,7 @@ add_custom_command(OUTPUT
${
CMAKE_BINARY_DIR
}
/lib_pyston/bz2.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/bz2.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/_ctypes.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/_ctypes.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/grp.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/grp.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/readline.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/termios.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/termios.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/_curses.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/_curses.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/mmap.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/mmap.pyston.so
...
@@ -149,6 +150,7 @@ add_custom_command(OUTPUT
...
@@ -149,6 +150,7 @@ add_custom_command(OUTPUT
Modules/_elementtree.c
Modules/_elementtree.c
Modules/bz2module.c
Modules/bz2module.c
Modules/grpmodule.c
Modules/grpmodule.c
Modules/readline.c
Modules/termios.c
Modules/termios.c
Modules/_cursesmodule.c
Modules/_cursesmodule.c
Modules/mmapmodule.c
Modules/mmapmodule.c
...
...
from_cpython/Modules/readline.c
View file @
4f432fee
...
@@ -1063,8 +1063,10 @@ readline_until_enter_or_signal(char *prompt, int *signal)
...
@@ -1063,8 +1063,10 @@ readline_until_enter_or_signal(char *prompt, int *signal)
#endif
/*defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) */
#endif
/*defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) */
// Pyston changes: change the type of 3rd argument from char* to const char*
// To match the type of Pyston PyOS_ReadlineFunctionPointer.
static
char
*
static
char
*
call_readline
(
FILE
*
sys_stdin
,
FILE
*
sys_stdout
,
char
*
prompt
)
call_readline
(
FILE
*
sys_stdin
,
FILE
*
sys_stdout
,
c
onst
c
har
*
prompt
)
{
{
size_t
n
;
size_t
n
;
char
*
p
,
*
q
;
char
*
p
,
*
q
;
...
@@ -1085,7 +1087,7 @@ call_readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
...
@@ -1085,7 +1087,7 @@ call_readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
#endif
#endif
}
}
p
=
readline_until_enter_or_signal
(
prompt
,
&
signal
);
p
=
readline_until_enter_or_signal
(
(
char
*
)
prompt
,
&
signal
);
/* we got an interrupt signal */
/* we got an interrupt signal */
if
(
signal
)
{
if
(
signal
)
{
...
@@ -1167,6 +1169,6 @@ initreadline(void)
...
@@ -1167,6 +1169,6 @@ initreadline(void)
if
(
m
==
NULL
)
if
(
m
==
NULL
)
return
;
return
;
PyOS_ReadlineFunctionPointer
=
call_readline
;
PyOS_ReadlineFunctionPointer
=
&
call_readline
;
setup_readline
();
setup_readline
();
}
}
from_cpython/setup.py
View file @
4f432fee
...
@@ -82,6 +82,12 @@ def curses_ext():
...
@@ -82,6 +82,12 @@ def curses_ext():
"Modules/_cursesmodule.c"
,
"Modules/_cursesmodule.c"
,
]),
libraries
=
[
'curses'
])
]),
libraries
=
[
'curses'
])
@
unique
def
readline_ext
():
return
Extension
(
"readline"
,
sources
=
map
(
relpath
,
[
"Modules/readline.c"
,
]))
@
unique
@
unique
def
termios_ext
():
def
termios_ext
():
return
Extension
(
"termios"
,
sources
=
map
(
relpath
,
[
return
Extension
(
"termios"
,
sources
=
map
(
relpath
,
[
...
@@ -142,6 +148,7 @@ ext_modules = [future_builtins_ext(),
...
@@ -142,6 +148,7 @@ ext_modules = [future_builtins_ext(),
ctypes_test_ext
(),
ctypes_test_ext
(),
grp_ext
(),
grp_ext
(),
curses_ext
(),
curses_ext
(),
readline_ext
(),
termios_ext
(),
termios_ext
(),
mmap_ext
(),
mmap_ext
(),
]
]
...
...
test/CPYTHON_TEST_NOTES.md
View file @
4f432fee
...
@@ -67,7 +67,7 @@ test_compileall [unknown]
...
@@ -67,7 +67,7 @@ test_compileall [unknown]
test_compiler [unknown]
test_compiler [unknown]
test_compile [unknown]
test_compile [unknown]
test_cookie [unknown]
test_cookie [unknown]
test_copy
[unknown]
test_copy
Please debug this test in VM.
test_cpickle [unknown]
test_cpickle [unknown]
test_cprofile [unknown]
test_cprofile [unknown]
test_crypt [unknown]
test_crypt [unknown]
...
@@ -173,7 +173,6 @@ test_pep352 various unique bugs
...
@@ -173,7 +173,6 @@ test_pep352 various unique bugs
test_pickletools [unknown]
test_pickletools [unknown]
test_pickle unknown
test_pickle unknown
test_pkg unknown bug
test_pkg unknown bug
test_platform [unknown]
test_poll [unknown]
test_poll [unknown]
test_poplib [unknown]
test_poplib [unknown]
test_pprint [unknown]
test_pprint [unknown]
...
@@ -184,7 +183,6 @@ test_pyclbr [unknown]
...
@@ -184,7 +183,6 @@ test_pyclbr [unknown]
test_py_compile [unknown]
test_py_compile [unknown]
test_pydoc [unknown]
test_pydoc [unknown]
test_random long("invalid number")
test_random long("invalid number")
test_readline [unknown]
test_repr complex.__hash__; some unknown issues
test_repr complex.__hash__; some unknown issues
test_resource [unknown]
test_resource [unknown]
test_richcmp PyObject_Not
test_richcmp PyObject_Not
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment