diff Mac/Python/macmain.c @ 4197:b70baba1c789 legacy-trunk

- Fixed PyMac_DoYield: - Update lastyield correctly - Do event handling if PyMac_YieldEnabled > 0 (previous cmd-. fix broke this) - Use our own GUSISpin routine: fixes crash when exiting with sockets open and keeps windows, etc reacting consistently when waiting for accepts(), etc.
author Jack Jansen <jack.jansen@cwi.nl>
date Wed, 04 Sep 1996 15:24:59 +0000
parents 5dc8c042905b
children 0410ed3808ee
line wrap: on
line diff
--- a/Mac/Python/macmain.c	Wed Sep 04 15:21:55 1996 +0000
+++ b/Mac/Python/macmain.c	Wed Sep 04 15:24:59 1996 +0000
@@ -28,6 +28,7 @@
 #include "pythonresources.h"
 #include "import.h"
 #include "marshal.h"
+#include "macglue.h"
 
 #include <Memory.h>
 #include <Resources.h>
@@ -108,6 +109,7 @@
 #if defined(USE_GUSI)
 	/* Setup GUSI */
 	GUSIDefaultSetup();
+	PyMac_SetGUSISpin();
 #endif
 
 #ifdef USE_SIOUX
@@ -396,7 +398,14 @@
 	}
 	else
 		SIOUXSettings.autocloseonquit = 1;
-#endif
+#ifdef USE_GUSI
+	/*
+	** Workaround for Sioux/GUSI combo: we should not call
+	** SiouxHandleOneEvent after the window is closed
+	*/
+	PyMac_ConsoleIsDead = 1;
+#endif /* USE_GUSI */
+#endif /* USE_SIOUX */
 #ifdef THINK_C
 	console_options.pause_atexit = keep;
 #endif