diff Modules/_tkinter.c @ 3262:bfb63b45ff0f legacy-trunk

Initialize GUSI on the mac.
author Jack Jansen <jack.jansen@cwi.nl>
date Tue, 14 Nov 1995 10:34:45 +0000
parents f7fd85b32a7d
children 6f5feb3b4829
line wrap: on
line diff
--- a/Modules/_tkinter.c	Tue Nov 14 10:34:04 1995 +0000
+++ b/Modules/_tkinter.c	Tue Nov 14 10:34:45 1995 +0000
@@ -13,6 +13,11 @@
 
 #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 @@
       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 @@
 
     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