Commit 44620646 authored by Guido van Rossum's avatar Guido van Rossum

Renamed Py_input_hook to PyOS_InputHook.

Also cleaned out some CR's left by the VC++ editor.
parent 0357d02e
...@@ -1480,7 +1480,7 @@ void ...@@ -1480,7 +1480,7 @@ void
init_tkinter() init_tkinter()
{ {
#ifndef WIN32 #ifndef WIN32
extern int (*Py_input_hook) (); extern int (*PyOS_InputHook) ();
#endif #endif
PyObject *m, *d; PyObject *m, *d;
...@@ -1506,8 +1506,8 @@ init_tkinter() ...@@ -1506,8 +1506,8 @@ init_tkinter()
ins_string(d, "TCL_VERSION", TCL_VERSION); ins_string(d, "TCL_VERSION", TCL_VERSION);
#ifndef WIN32 #ifndef WIN32
if (Py_input_hook == NULL) if (PyOS_InputHook == NULL)
Py_input_hook = EventHook; PyOS_InputHook = EventHook;
#endif #endif
if (PyErr_Occurred()) if (PyErr_Occurred())
......
...@@ -12,7 +12,7 @@ extern "C" { ...@@ -12,7 +12,7 @@ extern "C" {
#include <signal.h> #include <signal.h>
/* Routines needed from outside (but not declared in a header file). */ /* Routines needed from outside (but not declared in a header file). */
extern int (*Py_input_hook)(); extern int (*PyOS_InputHook)();
extern char *readline(); extern char *readline();
extern int rl_initialize(); extern int rl_initialize();
extern int rl_insert(); extern int rl_insert();
...@@ -98,7 +98,7 @@ PyOS_GnuReadline(prompt) ...@@ -98,7 +98,7 @@ PyOS_GnuReadline(prompt)
signal(SIGINT, old_inthandler); signal(SIGINT, old_inthandler);
return NULL; return NULL;
} }
rl_event_hook = Py_input_hook; rl_event_hook = PyOS_InputHook;
p = readline(prompt); p = readline(prompt);
signal(SIGINT, old_inthandler); signal(SIGINT, old_inthandler);
if (p == NULL) { if (p == NULL) {
......
...@@ -54,7 +54,7 @@ EXPORTS ...@@ -54,7 +54,7 @@ EXPORTS
PySlice_Type DATA PySlice_Type DATA
Py_InteractiveFlag DATA Py_InteractiveFlag DATA
PyCObject_Type DATA PyCObject_Type DATA
Py_input_hook DATA PyOS_InputHook DATA
PyOS_ReadlineFunctionPointer DATA PyOS_ReadlineFunctionPointer DATA
_PyObject_New _PyObject_New
......
...@@ -51,7 +51,7 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -51,7 +51,7 @@ PERFORMANCE OF THIS SOFTWARE.
#include "mymalloc.h" #include "mymalloc.h"
#include "intrcheck.h" #include "intrcheck.h"
int (*Py_input_hook)() = NULL; int (*PyOS_InputHook)() = NULL;
/* This function restarts a fgets() after an EINTR error occurred /* This function restarts a fgets() after an EINTR error occurred
except if PyOS_InterruptOccurred() returns true. */ except if PyOS_InterruptOccurred() returns true. */
...@@ -64,8 +64,8 @@ my_fgets(buf, len, fp) ...@@ -64,8 +64,8 @@ my_fgets(buf, len, fp)
{ {
char *p; char *p;
for (;;) { for (;;) {
if (Py_input_hook != NULL) if (PyOS_InputHook != NULL)
(void)(Py_input_hook)(); (void)(PyOS_InputHook)();
errno = 0; errno = 0;
p = fgets(buf, len, fp); p = fgets(buf, len, fp);
if (p != NULL) if (p != NULL)
......
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