Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31596)

Side by Side Diff: Modules/readline.c

Issue 24058: Compiler warning for readline extension (Closed)
Patch Set: Created 4 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This module makes GNU readline available to Python. It has ideas 1 /* This module makes GNU readline available to Python. It has ideas
2 * contributed by Lee Busby, LLNL, and William Magro, Cornell Theory 2 * contributed by Lee Busby, LLNL, and William Magro, Cornell Theory
3 * Center. The completer interface was inspired by Lele Gaifax. More 3 * Center. The completer interface was inspired by Lele Gaifax. More
4 * recently, it was largely rewritten by Guido van Rossum. 4 * recently, it was largely rewritten by Guido van Rossum.
5 */ 5 */
6 6
7 /* Standard definitions */ 7 /* Standard definitions */
8 #include "Python.h" 8 #include "Python.h"
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <setjmp.h> 10 #include <setjmp.h>
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 #if defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) 1055 #if defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT)
1056 1056
1057 static char *completed_input_string; 1057 static char *completed_input_string;
1058 static void 1058 static void
1059 rlhandler(char *text) 1059 rlhandler(char *text)
1060 { 1060 {
1061 completed_input_string = text; 1061 completed_input_string = text;
1062 rl_callback_handler_remove(); 1062 rl_callback_handler_remove();
1063 } 1063 }
1064 1064
1065 extern PyThreadState* _PyOS_ReadlineTState; 1065 PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
1066 1066
1067 static char * 1067 static char *
1068 readline_until_enter_or_signal(const char *prompt, int *signal) 1068 readline_until_enter_or_signal(const char *prompt, int *signal)
1069 { 1069 {
1070 char * not_done_reading = ""; 1070 char * not_done_reading = "";
1071 fd_set selectset; 1071 fd_set selectset;
1072 1072
1073 *signal = 0; 1073 *signal = 0;
1074 #ifdef HAVE_RL_CATCH_SIGNAL 1074 #ifdef HAVE_RL_CATCH_SIGNAL
1075 rl_catch_signals = 0; 1075 rl_catch_signals = 0;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1284 1284
1285 mod_state = (readlinestate *) PyModule_GetState(m); 1285 mod_state = (readlinestate *) PyModule_GetState(m);
1286 PyOS_ReadlineFunctionPointer = call_readline; 1286 PyOS_ReadlineFunctionPointer = call_readline;
1287 setup_readline(mod_state); 1287 setup_readline(mod_state);
1288 1288
1289 PyModule_AddIntConstant(m, "_READLINE_VERSION", RL_READLINE_VERSION); 1289 PyModule_AddIntConstant(m, "_READLINE_VERSION", RL_READLINE_VERSION);
1290 PyModule_AddIntConstant(m, "_READLINE_RUNTIME_VERSION", rl_readline_version) ; 1290 PyModule_AddIntConstant(m, "_READLINE_RUNTIME_VERSION", rl_readline_version) ;
1291 1291
1292 return m; 1292 return m;
1293 } 1293 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+