Commit 4f432fee authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #945 from Daetalus/test_readline

Add module "readline" and update CPython test notes.
parents 3769cc3c 65954dde
...@@ -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
......
...@@ -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, const char *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();
} }
...@@ -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(),
] ]
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment