summaryrefslogtreecommitdiffstats
path: root/Parser/myreadline.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/myreadline.c')
-rw-r--r--Parser/myreadline.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index dd00077..99ae6ac 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -100,14 +100,9 @@ my_fgets(buf, len, fp)
#endif /* WITH_READLINE */
-char *
-my_readline(prompt)
- char *prompt;
+void
+PyOS_ReadlineInit()
{
- int n;
- char *p;
-#ifdef WITH_READLINE
- RETSIGTYPE (*old_inthandler)();
static int been_here;
if (!been_here) {
/* Force rebind of TAB to insert-tab */
@@ -115,6 +110,18 @@ my_readline(prompt)
rl_bind_key('\t', rl_insert);
been_here++;
}
+}
+
+
+char *
+my_readline(prompt)
+ char *prompt;
+{
+ int n;
+ char *p;
+#ifdef WITH_READLINE
+ RETSIGTYPE (*old_inthandler)();
+ PyOS_ReadlineInit();
old_inthandler = signal(SIGINT, onintr);
if (setjmp(jbuf)) {
#ifdef HAVE_SIGRELSE