diff Mac/Python/macglue.c @ 2429:efb0685a6c91 legacy-trunk

return old value of PyMac_DoYieldEnabled; -1 means do not even check for interrupts
author Guido van Rossum <guido@python.org>
date Sun, 26 Feb 1995 10:20:53 +0000
parents 9bf18996eed8
children 2dcf7538347a
line wrap: on
line diff
--- a/Mac/Python/macglue.c	Sun Feb 26 10:19:42 1995 +0000
+++ b/Mac/Python/macglue.c	Sun Feb 26 10:20:53 1995 +0000
@@ -115,7 +115,12 @@
 static long lastyield;
 static int in_foreground;
 
-int PyMac_DoYieldEnabled = 1;	/* Don't do eventloop when false */
+/* 
+** When > 0, do full scanning for events (program is not event aware)
+** when == 0, only scan for Command-period
+** when < 0, don't do any event scanning 
+*/
+int PyMac_DoYieldEnabled = 1;
 
 /* Convert C to Pascal string. Returns pointer to static buffer. */
 unsigned char *
@@ -238,6 +243,8 @@
 int
 PyOS_InterruptOccurred()
 {
+	if (PyMac_DoYieldEnabled < 0)
+		return 0;
 #ifdef THINK_C
 	scan_event_queue(1);
 #endif
@@ -882,3 +889,4 @@
 	}
 	Py_Main(argc, argv);
 }
+