summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-11-14 10:34:45 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-11-14 10:34:45 (GMT)
commit40b546d40ebacdc984fa0f8cfd061854f895ccc7 (patch)
tree3507ad5d93e7bb232132020defb8460be254c0fe /Modules/_tkinter.c
parent8a5d0d498061fb09e35be32518d04bfdb0ef57d8 (diff)
downloadcpython-40b546d40ebacdc984fa0f8cfd061854f895ccc7.zip
cpython-40b546d40ebacdc984fa0f8cfd061854f895ccc7.tar.gz
cpython-40b546d40ebacdc984fa0f8cfd061854f895ccc7.tar.bz2
Initialize GUSI on the mac.
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 94bd729..0108795 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -13,6 +13,11 @@ static FSSpec library_fss;
#ifdef MAC_TCL
#define WITH_APPINIT
+#ifdef __MWERKS__
+void GUSISetup (void (*socketfamily)());
+void GUSIwithInternetSockets (void);
+void GUSIwithSIOUXSockets (void);
+#endif
#endif
#define PyInit__tkinter init_tkinter
@@ -1271,6 +1276,9 @@ PyInit__tkinter ()
if (Py_AtExit (Tkinter_Cleanup) != 0)
fprintf(stderr,
"Tkinter: warning: cleanup procedure not registered\n");
+#ifdef __MWERKS__
+ PyTk_InitGUSI();
+#endif
}
if (PyErr_Occurred ())
@@ -1295,6 +1303,19 @@ panic(char * format, ...)
Py_FatalError("Tcl/Tk panic");
}
+#ifdef __MWERKS__
+void
+PyTk_InitGUSI()
+{
+ static int is_inited;
+
+ if ( is_inited ) return;
+ GUSISetup(GUSIwithInternetSockets);
+ GUSISetup(GUSIwithSIOUXSockets);
+ is_inited = 1;
+}
+#endif /* __MWERKS__ */
+
/*
** If this module is dynamically loaded the following routine should