]> granicus.if.org Git - python/commitdiff
First tweaks to allow MacPython to be compiled with
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 5 Nov 2001 16:16:39 +0000 (16:16 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 5 Nov 2001 16:16:39 +0000 (16:16 +0000)
Universal Headers 3.4

Mac/Modules/dlg/_Dlgmodule.c
Mac/Modules/dlg/dlgscan.py
Mac/Modules/dlg/dlgsupport.py
Mac/Modules/win/_Winmodule.c
Mac/Modules/win/winsupport.py

index e465129c2106e5fe51b7a60815b0c3f44cf4274c..6983321a69abea1309116d3840e7ffbf04d39e69 100644 (file)
@@ -36,7 +36,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *);
 #define DlgObj_Convert _DlgObj_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
 #define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
 #define SetPortDialogPort(dlg) SetPort(dlg)
 #define GetDialogPort(dlg) ((CGrafPtr)(dlg))
@@ -769,20 +769,6 @@ static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *DlgObj_SetGrafPortOfDialog(DialogObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SetGrafPortOfDialog(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyMethodDef DlgObj_methods[] = {
        {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
         "() -> None"},
@@ -865,10 +851,6 @@ static PyMethodDef DlgObj_methods[] = {
        {"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
         "() -> (CGrafPtr _rv)"},
 
-#if !TARGET_API_MAC_CARBON
-       {"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
-        "() -> None"},
-#endif
        {NULL, NULL, 0}
 };
 
index 549d0b3b2a6d17098c1f158114784f335dd3dc14..2c6308022168e504dc0f0b428a318f63cbe8a530 100644 (file)
@@ -53,6 +53,7 @@ class MyScanner(Scanner):
 ##                     # Can't find these in the CW Pro 3 libraries
                        'SetDialogMovableModal',
                        'GetDialogControlNotificationProc',
+                       'SetGrafPortOfDialog', # Funny, and probably not useful
                        ]
 
        def makegreylist(self):
index af72b3ae5f826f001c2e1da2edd418169add2b5a..e496eb2b6cfe2b9b76b740da987febc49f3df99c 100644 (file)
@@ -47,7 +47,7 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *);
 #define DlgObj_Convert _DlgObj_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
 #define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
 #define SetPortDialogPort(dlg) SetPort(dlg)
 #define GetDialogPort(dlg) ((CGrafPtr)(dlg))
index 13ebe20f1478c741651da3bf56cb3eed452ee6ec..623782d8afc11582b836bed19e293126ac749461 100644 (file)
@@ -36,11 +36,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
 #define WinObj_Convert _WinObj_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
 /* Carbon calls that we emulate in classic mode */
 #define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
 #define GetWindowFromPort(port) ((WindowRef)(port))
 #define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
+#endif
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS
 #define IsPointerValid(p) (((long)p&3) == 0)
 #endif
 #if ACCESSOR_CALLS_ARE_FUNCTIONS
index 8a38b97c696407959df583aaca5dbd6f7ba41da2..29afcc69b685c7ea8e650eb01454eec0c1902dad 100644 (file)
@@ -70,11 +70,13 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
 #define WinObj_Convert _WinObj_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS  && UNIVERSAL_INTERFACES_VERSION < 0x340
 /* Carbon calls that we emulate in classic mode */
 #define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
 #define GetWindowFromPort(port) ((WindowRef)(port))
 #define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
+#endif
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS
 #define IsPointerValid(p) (((long)p&3) == 0)
 #endif
 #if ACCESSOR_CALLS_ARE_FUNCTIONS