]> granicus.if.org Git - python/commitdiff
SF #1015517, get readline to compile with older compilers
authorNeal Norwitz <nnorwitz@gmail.com>
Wed, 25 Aug 2004 01:20:18 +0000 (01:20 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Wed, 25 Aug 2004 01:20:18 +0000 (01:20 +0000)
Modules/readline.c

index 67ae04db33ef5c650b47d028632c1176e0d30933..a62244dda4e1e3c1c527aa6a923334f3466718cc 100644 (file)
@@ -823,15 +823,16 @@ readline_until_enter_or_signal(char *prompt, int *signal)
 static char *
 call_readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
 {
+       size_t n;
+       char *p, *q;
+       int signal;
+
 #ifdef SAVE_LOCALE
        char *saved_locale = strdup(setlocale(LC_CTYPE, NULL));
        if (!saved_locale)
                Py_FatalError("not enough memory to save locale");
        setlocale(LC_CTYPE, "");
 #endif
-       size_t n;
-       char *p, *q;
-       int signal;
 
        rl_event_hook = PyOS_InputHook;