diff options
author | Guido van Rossum <guido@python.org> | 1997-08-07 00:12:22 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-07 00:12:22 (GMT) |
commit | 02c0467f6777281c302b301afe56feef69cafec9 (patch) | |
tree | e6f8ce897fe3970b85b58c224a6669264b2ad412 /Modules/_tkinter.c | |
parent | 29c1ea5af0b9d309c1342db5b75f5e0c7618e8e7 (diff) | |
download | cpython-02c0467f6777281c302b301afe56feef69cafec9.zip cpython-02c0467f6777281c302b301afe56feef69cafec9.tar.gz cpython-02c0467f6777281c302b301afe56feef69cafec9.tar.bz2 |
Rather unsatisfactory temporary hack to get it to run
under WIN32 -- remove file handler interface, don't use Py_input_hook.
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r-- | Modules/_tkinter.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 1f32c4a..f45e29c 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -985,6 +985,7 @@ GetFileNo(file) static PyObject* Tkapp_ClientDataDict = NULL; +#ifndef WIN32 static PyObject * Tkapp_CreateFileHandler(self, args) PyObject *self; @@ -1088,6 +1089,7 @@ Tkapp_DeleteFileHandler(self, args) Py_INCREF(Py_None); return Py_None; } +#endif /* WIN32 */ /**** Tktt Object (timer token) ****/ @@ -1338,8 +1340,10 @@ static PyMethodDef Tkapp_methods[] = {"merge", Tkapp_Merge, 0}, {"createcommand", Tkapp_CreateCommand, 1}, {"deletecommand", Tkapp_DeleteCommand, 1}, +#ifndef WIN32 {"createfilehandler", Tkapp_CreateFileHandler, 1}, {"deletefilehandler", Tkapp_DeleteFileHandler, 1}, +#endif {"createtimerhandler", Tkapp_CreateTimerHandler, 1}, {"mainloop", Tkapp_MainLoop, 1}, {"dooneevent", Tkapp_DoOneEvent, 1}, @@ -1419,8 +1423,10 @@ Tkinter_Create(self, args) static PyMethodDef moduleMethods[] = { {"create", Tkinter_Create, 1}, +#ifndef WIN32 {"createfilehandler", Tkapp_CreateFileHandler, 1}, {"deletefilehandler", Tkapp_DeleteFileHandler, 1}, +#endif {"createtimerhandler", Tkapp_CreateTimerHandler, 1}, {"mainloop", Tkapp_MainLoop, 1}, {"dooneevent", Tkapp_DoOneEvent, 1}, @@ -1473,7 +1479,9 @@ ins_string(d, name, val) void init_tkinter() { +#ifndef WIN32 extern int (*Py_input_hook) (); +#endif PyObject *m, *d; Tkapp_Type.ob_type = &PyType_Type; @@ -1497,8 +1505,10 @@ init_tkinter() ins_string(d, "TK_VERSION", TK_VERSION); ins_string(d, "TCL_VERSION", TCL_VERSION); +#ifndef WIN32 if (Py_input_hook == NULL) Py_input_hook = EventHook; +#endif if (PyErr_Occurred()) Py_FatalError("can't initialize module _tkinter"); |