From 66b8dba0a94b1ad88bf8562e00d766ce4484abc6 Mon Sep 17 00:00:00 2001 From: sashk Date: Mon, 12 Sep 2016 14:24:35 -0400 Subject: [PATCH] First attempt to get 2.7/i386 compiled on macOS 10.12 Sierra. --- Include/pymactoolbox.h | 26 ++++++++++++++------------ Mac/Modules/ColorPickermodule.c | 5 ++--- Mac/Modules/MacOS.c | 4 ++-- Mac/Modules/OSATerminology.c | 4 ++-- Mac/Modules/app/_Appmodule.c | 9 +++++---- Mac/Modules/carbonevt/_CarbonEvtmodule.c | 8 ++++---- Mac/Modules/ctl/_Ctlmodule.c | 8 ++++---- Mac/Modules/dlg/_Dlgmodule.c | 8 ++++---- Mac/Modules/drag/_Dragmodule.c | 8 ++++---- Mac/Modules/help/_Helpmodule.c | 10 +++++----- Mac/Modules/ibcarbon/_IBCarbon.c | 10 +++++----- Mac/Modules/icn/_Icnmodule.c | 10 +++++----- Mac/Modules/list/_Listmodule.c | 12 ++++++------ Mac/Modules/mlte/_Mltemodule.c | 10 +++++----- Mac/Modules/qt/_Qtmodule.c | 10 +++++----- Mac/Modules/res/_Resmodule.c | 1 - Mac/Modules/te/_TEmodule.c | 10 +++++----- Mac/Modules/win/_Winmodule.c | 12 ++++++------ Python/mactoolboxglue.c | 4 ++-- 19 files changed, 85 insertions(+), 84 deletions(-) diff --git a/Include/pymactoolbox.h b/Include/pymactoolbox.h index fd15975..fee5b07 100644 --- a/Include/pymactoolbox.h +++ b/Include/pymactoolbox.h @@ -9,7 +9,9 @@ #include -#ifndef __LP64__ +#include + +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include #endif /* !__LP64__ */ @@ -21,7 +23,7 @@ extern PyObject *PyMac_OSErrException; /* Exception for OSErr */ PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */ PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */ PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert fsspec->path */ #endif /* __LP64__ */ @@ -109,38 +111,38 @@ extern PyObject *CmpInstObj_New(ComponentInstance); extern int CmpInstObj_Convert(PyObject *, ComponentInstance *); /* Ctl exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *CtlObj_New(ControlHandle); extern int CtlObj_Convert(PyObject *, ControlHandle *); #endif /* !__LP64__ */ /* Dlg exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *DlgObj_New(DialogPtr); extern int DlgObj_Convert(PyObject *, DialogPtr *); extern PyObject *DlgObj_WhichDialog(DialogPtr); #endif /* !__LP64__ */ /* Drag exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *DragObj_New(DragReference); extern int DragObj_Convert(PyObject *, DragReference *); #endif /* !__LP64__ */ /* List exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *ListObj_New(ListHandle); extern int ListObj_Convert(PyObject *, ListHandle *); #endif /* !__LP64__ */ /* Menu exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *MenuObj_New(MenuHandle); extern int MenuObj_Convert(PyObject *, MenuHandle *); #endif /* !__LP64__ */ /* Qd exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *GrafObj_New(GrafPtr); extern int GrafObj_Convert(PyObject *, GrafPtr *); extern PyObject *BMObj_New(BitMapPtr); @@ -150,13 +152,13 @@ extern int QdRGB_Convert(PyObject *, RGBColor *); #endif /* !__LP64__ */ /* Qdoffs exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *GWorldObj_New(GWorldPtr); extern int GWorldObj_Convert(PyObject *, GWorldPtr *); #endif /* !__LP64__ */ /* Qt exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *TrackObj_New(Track); extern int TrackObj_Convert(PyObject *, Track *); extern PyObject *MovieObj_New(Movie); @@ -178,13 +180,13 @@ extern PyObject *OptResObj_New(Handle); extern int OptResObj_Convert(PyObject *, Handle *); /* TE exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *TEObj_New(TEHandle); extern int TEObj_Convert(PyObject *, TEHandle *); #endif /* !__LP64__ */ /* Win exports */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) extern PyObject *WinObj_New(WindowPtr); extern int WinObj_Convert(PyObject *, WindowPtr *); extern PyObject *WinObj_WhichWindow(WindowPtr); diff --git a/Mac/Modules/ColorPickermodule.c b/Mac/Modules/ColorPickermodule.c index 688c468..4c7ff70 100644 --- a/Mac/Modules/ColorPickermodule.c +++ b/Mac/Modules/ColorPickermodule.c @@ -28,7 +28,7 @@ PERFORMANCE OF THIS SOFTWARE. /* ----------------------------------------------------- */ -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) static char cp_GetColor__doc__[] = "GetColor(prompt, (r, g, b)) -> (r, g, b), ok" @@ -54,7 +54,7 @@ cp_GetColor(PyObject *self, PyObject *args) /* List of methods defined in the module */ static struct PyMethodDef cp_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"GetColor", (PyCFunction)cp_GetColor, METH_VARARGS, cp_GetColor__doc__}, #endif /* __LP64__ */ {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ @@ -87,4 +87,3 @@ void initColorPicker(void) if (PyErr_Occurred()) Py_FatalError("can't initialize module ColorPicker"); } - diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c index 28de4f5..0c33600 100644 --- a/Mac/Modules/MacOS.c +++ b/Mac/Modules/MacOS.c @@ -299,7 +299,7 @@ MacOS_GetCreatorAndType(PyObject *self, PyObject *args) FileInfo* finfo; if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &ref)) { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) /* This function is documented to take an FSSpec as well, * which only works in 32-bit mode. */ @@ -372,7 +372,7 @@ MacOS_SetCreatorAndType(PyObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "O&O&O&", PyMac_GetFSRef, &ref, PyMac_GetOSType, &creator, PyMac_GetOSType, &type)) { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) /* Try to handle FSSpec arguments, for backward compatibility */ FSSpec fss; FInfo info; diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c index 2114d07..de9d4d4 100644 --- a/Mac/Modules/OSATerminology.c +++ b/Mac/Modules/OSATerminology.c @@ -14,7 +14,7 @@ #include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) static PyObject * PyOSA_GetAppTerminology(PyObject* self, PyObject* args) { @@ -80,7 +80,7 @@ PyOSA_GetSysTerminology(PyObject* self, PyObject* args) */ static struct PyMethodDef OSATerminology_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"GetAppTerminology", (PyCFunction) PyOSA_GetAppTerminology, METH_VARARGS, diff --git a/Mac/Modules/app/_Appmodule.c b/Mac/Modules/app/_Appmodule.c index c791807..fe94ec7 100644 --- a/Mac/Modules/app/_Appmodule.c +++ b/Mac/Modules/app/_Appmodule.c @@ -2,8 +2,10 @@ /* ========================== Module _App =========================== */ #include "Python.h" +#include -#ifndef __LP64__ + +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) /* Carbon GUI stuff, not available in 64-bit mode */ @@ -1806,13 +1808,13 @@ static PyMethodDef App_methods[] = { void init_App(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; #endif /* !__LP64__ */ m = Py_InitModule("_App", App_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); App_Error = PyMac_GetOSErrException(); if (App_Error == NULL || diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c index 30d40c9..b9ecfe2 100644 --- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c +++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c @@ -2,8 +2,9 @@ /* ======================= Module _CarbonEvt ======================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -2141,14 +2142,14 @@ static PyMethodDef CarbonEvents_methods[] = { void init_CarbonEvt(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; #endif /* !__LP64__ */ m = Py_InitModule("_CarbonEvt", CarbonEvents_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) myEventHandlerUPP = NewEventHandlerUPP(myEventHandler); d = PyModule_GetDict(m); CarbonEvents_Error = PyMac_GetOSErrException(); diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c index a959eb4..8dcd865 100644 --- a/Mac/Modules/ctl/_Ctlmodule.c +++ b/Mac/Modules/ctl/_Ctlmodule.c @@ -2,8 +2,9 @@ /* ========================== Module _Ctl =========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -5778,7 +5779,7 @@ void init_Ctl(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; mytracker_upp = NewControlActionUPP(mytracker); @@ -5795,7 +5796,7 @@ void init_Ctl(void) m = Py_InitModule("_Ctl", Ctl_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Ctl_Error = PyMac_GetOSErrException(); if (Ctl_Error == NULL || diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c index c4d66a9..149a4f7 100644 --- a/Mac/Modules/dlg/_Dlgmodule.c +++ b/Mac/Modules/dlg/_Dlgmodule.c @@ -2,8 +2,9 @@ /* ========================== Module _Dlg =========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -1577,7 +1578,7 @@ static PyMethodDef Dlg_methods[] = { void init_Dlg(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; @@ -1589,7 +1590,7 @@ void init_Dlg(void) m = Py_InitModule("_Dlg", Dlg_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Dlg_Error = PyMac_GetOSErrException(); if (Dlg_Error == NULL || diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c index aa87690..76097c2 100644 --- a/Mac/Modules/drag/_Dragmodule.c +++ b/Mac/Modules/drag/_Dragmodule.c @@ -2,8 +2,9 @@ /* ========================== Module _Drag ========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -1117,7 +1118,7 @@ static PyMethodDef Drag_methods[] = { void init_Drag(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; @@ -1128,7 +1129,7 @@ void init_Drag(void) m = Py_InitModule("_Drag", Drag_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Drag_Error = PyMac_GetOSErrException(); if (Drag_Error == NULL || diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c index eaa2e8a..61ac704 100644 --- a/Mac/Modules/help/_Helpmodule.c +++ b/Mac/Modules/help/_Helpmodule.c @@ -2,8 +2,9 @@ /* ========================== Module _Help ========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -148,7 +149,7 @@ static PyObject *Help_HMHideTag(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef Help_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"HMGetHelpMenu", (PyCFunction)Help_HMGetHelpMenu, 1, PyDoc_STR("() -> (MenuRef outHelpMenu, MenuItemIndex outFirstCustomItemIndex)")}, {"HMAreHelpTagsDisplayed", (PyCFunction)Help_HMAreHelpTagsDisplayed, 1, @@ -175,7 +176,7 @@ static PyMethodDef Help_methods[] = { void init_Help(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; #endif /* __LP64__ */ @@ -183,7 +184,7 @@ void init_Help(void) m = Py_InitModule("_Help", Help_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Help_Error = PyMac_GetOSErrException(); if (Help_Error == NULL || diff --git a/Mac/Modules/ibcarbon/_IBCarbon.c b/Mac/Modules/ibcarbon/_IBCarbon.c index 2a65f42..a6fb410 100644 --- a/Mac/Modules/ibcarbon/_IBCarbon.c +++ b/Mac/Modules/ibcarbon/_IBCarbon.c @@ -2,9 +2,10 @@ /* ======================== Module _IBCarbon ======================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include #include "pymactoolbox.h" @@ -228,7 +229,7 @@ static PyObject *IBCarbon_CreateNibReference(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef IBCarbon_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"CreateNibReference", (PyCFunction)IBCarbon_CreateNibReference, 1, PyDoc_STR("(CFStringRef inNibName) -> (IBNibRef outNibRef)")}, #endif /* __LP64__ */ @@ -241,7 +242,7 @@ static PyMethodDef IBCarbon_methods[] = { void init_IBCarbon(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; #endif /* __LP64__ */ @@ -250,7 +251,7 @@ void init_IBCarbon(void) m = Py_InitModule("_IBCarbon", IBCarbon_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); IBCarbon_Error = PyMac_GetOSErrException(); if (IBCarbon_Error == NULL || diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c index 6967ae4..c7b9886 100644 --- a/Mac/Modules/icn/_Icnmodule.c +++ b/Mac/Modules/icn/_Icnmodule.c @@ -2,9 +2,10 @@ /* ========================== Module _Icn =========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -1451,7 +1452,7 @@ static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef Icn_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"GetCIcon", (PyCFunction)Icn_GetCIcon, 1, PyDoc_STR("(SInt16 iconID) -> (CIconHandle _rv)")}, {"PlotCIcon", (PyCFunction)Icn_PlotCIcon, 1, @@ -1586,7 +1587,7 @@ static PyMethodDef Icn_methods[] = { void init_Icn(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; #endif /* __LP64__ */ @@ -1594,7 +1595,7 @@ void init_Icn(void) m = Py_InitModule("_Icn", Icn_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Icn_Error = PyMac_GetOSErrException(); if (Icn_Error == NULL || diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c index 9e63686..75eef41 100644 --- a/Mac/Modules/list/_Listmodule.c +++ b/Mac/Modules/list/_Listmodule.c @@ -2,8 +2,9 @@ /* ========================== Module _List ========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -1035,7 +1036,7 @@ static PyObject *List_as_List(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef List_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"CreateCustomList", (PyCFunction)List_CreateCustomList, 1, PyDoc_STR("(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)")}, {"LNew", (PyCFunction)List_LNew, 1, @@ -1062,7 +1063,7 @@ static PyMethodDef List_methods[] = { {NULL, NULL, 0} }; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) static void myListDefFunction(SInt16 message, @@ -1106,7 +1107,7 @@ static void myListDefFunction(SInt16 message, void init_List(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; @@ -1119,7 +1120,7 @@ void init_List(void) m = Py_InitModule("_List", List_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); List_Error = PyMac_GetOSErrException(); if (List_Error == NULL || diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c index cd698f4..56d4623 100644 --- a/Mac/Modules/mlte/_Mltemodule.c +++ b/Mac/Modules/mlte/_Mltemodule.c @@ -2,8 +2,9 @@ /* ========================== Module _Mlte ========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -1626,7 +1627,7 @@ static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef Mlte_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1, PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")}, {"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1, @@ -1653,7 +1654,7 @@ static PyMethodDef Mlte_methods[] = { void init_Mlte(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; @@ -1663,7 +1664,7 @@ void init_Mlte(void) #endif /* __LP64__ */ m = Py_InitModule("_Mlte", Mlte_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Mlte_Error = PyMac_GetOSErrException(); if (Mlte_Error == NULL || diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c index bf67cda..2475238 100644 --- a/Mac/Modules/qt/_Qtmodule.c +++ b/Mac/Modules/qt/_Qtmodule.c @@ -2,9 +2,10 @@ /* =========================== Module _Qt =========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -26298,7 +26299,7 @@ static PyObject *Qt_MoviesTask(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef Qt_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1, PyDoc_STR("() -> None")}, {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1, @@ -28001,7 +28002,7 @@ static PyMethodDef Qt_methods[] = { void init_Qt(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; @@ -28022,7 +28023,7 @@ void init_Qt(void) m = Py_InitModule("_Qt", Qt_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Qt_Error = PyMac_GetOSErrException(); if (Qt_Error == NULL || diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c index a998fc8..9f58f24 100644 --- a/Mac/Modules/te/_TEmodule.c +++ b/Mac/Modules/te/_TEmodule.c @@ -2,8 +2,9 @@ /* =========================== Module _TE =========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -1271,7 +1272,7 @@ static PyObject *TE_as_TE(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef TE_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"TEScrapHandle", (PyCFunction)TE_TEScrapHandle, 1, PyDoc_STR("() -> (Handle _rv)")}, {"TEGetScrapLength", (PyCFunction)TE_TEGetScrapLength, 1, @@ -1308,7 +1309,7 @@ static PyMethodDef TE_methods[] = { void init_TE(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; @@ -1319,7 +1320,7 @@ void init_TE(void) #endif /* __LP64__ */ m = Py_InitModule("_TE", TE_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); TE_Error = PyMac_GetOSErrException(); if (TE_Error == NULL || diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index 89233ed..2f9b6dd 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -2,8 +2,9 @@ /* ========================== Module _Win =========================== */ #include "Python.h" +#include -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) #include "pymactoolbox.h" @@ -3150,7 +3151,7 @@ static PyObject *Win_FindWindow(PyObject *_self, PyObject *_args) #endif /* __LP64__ */ static PyMethodDef Win_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1, PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")}, {"NewWindow", (PyCFunction)Win_NewWindow, 1, @@ -3207,7 +3208,7 @@ static PyMethodDef Win_methods[] = { -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) /* Return the object corresponding to the window, or NULL */ PyObject * @@ -3235,7 +3236,7 @@ WinObj_WhichWindow(WindowPtr w) void init_Win(void) { PyObject *m; -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) PyObject *d; PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New); @@ -3245,7 +3246,7 @@ void init_Win(void) #endif /* __LP64__ */ m = Py_InitModule("_Win", Win_methods); -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) d = PyModule_GetDict(m); Win_Error = PyMac_GetOSErrException(); if (Win_Error == NULL || diff --git a/Python/mactoolboxglue.c b/Python/mactoolboxglue.c index 92bf3e8..faf1835 100644 --- a/Python/mactoolboxglue.c +++ b/Python/mactoolboxglue.c @@ -106,7 +106,7 @@ PyMac_Error(OSErr err) } -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) OSErr PyMac_GetFullPathname(FSSpec *fss, char *path, int len) { @@ -419,7 +419,7 @@ GLUE_CONVERT(RGBColor, QdRGB_Convert, "Carbon.Qd") GLUE_NEW(GWorldPtr, GWorldObj_New, "Carbon.Qdoffs") GLUE_CONVERT(GWorldPtr, GWorldObj_Convert, "Carbon.Qdoffs") -#ifndef __LP64__ +#if !defined (DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER) && !defined (__LP64__) GLUE_NEW(Track, TrackObj_New, "Carbon.Qt") GLUE_CONVERT(Track, TrackObj_Convert, "Carbon.Qt") GLUE_NEW(Movie, MovieObj_New, "Carbon.Qt") -- 2.8.4 (Apple Git-73)