]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed command-. handling
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 19 Aug 1996 15:11:45 +0000 (15:11 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 19 Aug 1996 15:11:45 +0000 (15:11 +0000)
Added hacks for GetEventQueue (so you don't have to edit Events.h)

Mac/Python/macglue.c

index 2c8951ad86ec87e53d07edec856f996fa0cdba33..112604ee02850898565cc9b6ca6465085131e1f6 100644 (file)
@@ -22,6 +22,20 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ******************************************************************/
 
+#ifdef __CFM68K__
+/* cfm68k InterfaceLib exports GetEventQueue, but Events.h doesn't know this
+** and defines it as GetEvQHdr (which is correct for PPC). This fix is for
+** CW9, check that the workaround is still needed for the next release.
+*/
+#define GetEvQHdr GetEventQueue
+#endif /* __CFM68K__ */
+
+#include <Events.h>
+
+#ifdef __CFM68K__
+#undef GetEventQueue
+#endif /* __CFM68K__ */
+
 #include "Python.h"
 
 #include "macglue.h"
@@ -35,7 +49,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <StandardFile.h>
 #include <Resources.h>
 #include <Memory.h>
-#include <Events.h>
 #include <Windows.h>
 #include <Desk.h>
 #include <Traps.h>
@@ -402,7 +415,7 @@ PyMac_DoYield()
                                                        NGetTrapAddress(_Unimplemented, ToolTrap));
        }
 
-       if ( !PyMac_DoYieldEnabled ) {
+       if ( PyMac_DoYieldEnabled >= 0) {
 #ifndef THINK_C
                /* Under think this has been done before in intrcheck() or intrpeek() */
                scan_event_queue(0);