From e48cef7aba0993ca6d01579f62900f0596960885 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 19 Nov 2003 16:13:35 +0000 Subject: [PATCH] Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS: MacOS9isms. --- Mac/Modules/ae/_AEmodule.c | 11 +--- Mac/Modules/ae/aesupport.py | 5 -- Mac/Modules/ah/_AHmodule.c | 10 +--- Mac/Modules/ah/ahsupport.py | 4 -- Mac/Modules/app/_Appmodule.c | 11 +--- Mac/Modules/app/appsupport.py | 5 -- Mac/Modules/carbonevt/CarbonEvtsupport.py | 4 -- Mac/Modules/carbonevt/_CarbonEvtmodule.c | 4 -- Mac/Modules/cf/_CFmodule.c | 11 ---- Mac/Modules/cf/cfsupport.py | 11 ---- Mac/Modules/cf/pycfbridge.c | 10 ---- Mac/Modules/cg/_CGmodule.c | 11 +--- Mac/Modules/cg/cgsupport.py | 5 -- Mac/Modules/cm/_Cmmodule.c | 10 +--- Mac/Modules/cm/cmsupport.py | 4 -- Mac/Modules/ctl/_Ctlmodule.c | 11 +--- Mac/Modules/ctl/ctlsupport.py | 5 -- Mac/Modules/dlg/_Dlgmodule.c | 4 -- Mac/Modules/dlg/dlgsupport.py | 4 -- Mac/Modules/drag/_Dragmodule.c | 10 +--- Mac/Modules/drag/dragsupport.py | 4 -- Mac/Modules/evt/_Evtmodule.c | 10 +--- Mac/Modules/evt/evtsupport.py | 4 -- Mac/Modules/file/_Filemodule.c | 4 -- Mac/Modules/file/filesupport.py | 4 -- Mac/Modules/fm/_Fmmodule.c | 10 +--- Mac/Modules/fm/fmsupport.py | 4 -- Mac/Modules/folder/_Foldermodule.c | 10 +--- Mac/Modules/folder/foldersupport.py | 4 -- Mac/Modules/help/_Helpmodule.c | 10 +--- Mac/Modules/help/helpsupport.py | 4 -- Mac/Modules/ibcarbon/IBCarbonsupport.py | 4 -- Mac/Modules/ibcarbon/_IBCarbon.c | 4 -- Mac/Modules/icn/_Icnmodule.c | 10 +--- Mac/Modules/icn/icnsupport.py | 4 -- Mac/Modules/list/_Listmodule.c | 35 +----------- Mac/Modules/list/listsupport.py | 29 ---------- Mac/Modules/menu/_Menumodule.c | 21 +------ Mac/Modules/menu/menusupport.py | 15 ----- Mac/Modules/mlte/_Mltemodule.c | 10 +--- Mac/Modules/mlte/mltesupport.py | 4 -- Mac/Modules/qd/_Qdmodule.c | 67 ----------------------- Mac/Modules/qd/qdsupport.py | 67 ----------------------- Mac/Modules/qdoffs/_Qdoffsmodule.c | 10 +--- Mac/Modules/qdoffs/qdoffssupport.py | 4 -- Mac/Modules/qt/_Qtmodule.c | 5 -- Mac/Modules/qt/qtsupport.py | 5 -- Mac/Modules/res/_Resmodule.c | 11 +--- Mac/Modules/res/ressupport.py | 5 -- Mac/Modules/scrap/_Scrapmodule.c | 4 -- Mac/Modules/scrap/scrapsupport.py | 4 -- Mac/Modules/snd/_Sndmodule.c | 14 +---- Mac/Modules/snd/sndsupport.py | 5 -- Mac/Modules/te/_TEmodule.c | 10 +--- Mac/Modules/te/tesupport.py | 4 -- Mac/Modules/win/_Winmodule.c | 4 -- Mac/Modules/win/winsupport.py | 4 -- 57 files changed, 57 insertions(+), 520 deletions(-) diff --git a/Mac/Modules/ae/_AEmodule.c b/Mac/Modules/ae/_AEmodule.c index c5445dc883d..91364e7b236 100644 --- a/Mac/Modules/ae/_AEmodule.c +++ b/Mac/Modules/ae/_AEmodule.c @@ -14,21 +14,16 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_AEDesc_New(AEDesc *); diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py index 89a571baa50..672b5441f7d 100644 --- a/Mac/Modules/ae/aesupport.py +++ b/Mac/Modules/ae/aesupport.py @@ -85,12 +85,7 @@ includestuff = includestuff + """ #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_AEDesc_New(AEDesc *); diff --git a/Mac/Modules/ah/_AHmodule.c b/Mac/Modules/ah/_AHmodule.c index cf690764079..9408e530836 100644 --- a/Mac/Modules/ah/_AHmodule.c +++ b/Mac/Modules/ah/_AHmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif static PyObject *Ah_Error; diff --git a/Mac/Modules/ah/ahsupport.py b/Mac/Modules/ah/ahsupport.py index a1e6d00ac47..c91c298ded9 100644 --- a/Mac/Modules/ah/ahsupport.py +++ b/Mac/Modules/ah/ahsupport.py @@ -20,11 +20,7 @@ from macsupport import * AHTOCType = Type("AHTOCType", "h") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif """ diff --git a/Mac/Modules/app/_Appmodule.c b/Mac/Modules/app/_Appmodule.c index 069c08feb15..2a743250c09 100644 --- a/Mac/Modules/app/_Appmodule.c +++ b/Mac/Modules/app/_Appmodule.c @@ -14,18 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif - int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself) diff --git a/Mac/Modules/app/appsupport.py b/Mac/Modules/app/appsupport.py index dc8ae4f4154..a9d87681b81 100644 --- a/Mac/Modules/app/appsupport.py +++ b/Mac/Modules/app/appsupport.py @@ -79,12 +79,7 @@ ThemeButtonDrawUPP = FakeType("NULL") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif - int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself) diff --git a/Mac/Modules/carbonevt/CarbonEvtsupport.py b/Mac/Modules/carbonevt/CarbonEvtsupport.py index 492720f851a..19d7d6d6fd2 100644 --- a/Mac/Modules/carbonevt/CarbonEvtsupport.py +++ b/Mac/Modules/carbonevt/CarbonEvtsupport.py @@ -74,11 +74,7 @@ MouseTrackingResult = UInt16 includestuff = r""" -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #include "macglue.h" diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c index 6d1aa0f2efa..46eb31e414b 100755 --- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c +++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c @@ -5,11 +5,7 @@ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #include "macglue.h" diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c index d6dba45de37..8a82d2bd79c 100644 --- a/Mac/Modules/cf/_CFmodule.c +++ b/Mac/Modules/cf/_CFmodule.c @@ -20,18 +20,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#include -#include -#include -#include -#include -#include -#else #include -#endif #include "pycfbridge.h" diff --git a/Mac/Modules/cf/cfsupport.py b/Mac/Modules/cf/cfsupport.py index f27c58b1613..e68ae034bdb 100644 --- a/Mac/Modules/cf/cfsupport.py +++ b/Mac/Modules/cf/cfsupport.py @@ -42,18 +42,7 @@ class MethodSkipArg1(MethodGenerator): # Create the type objects includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#include -#include -#include -#include -#include -#include -#else #include -#endif #include "pycfbridge.h" diff --git a/Mac/Modules/cf/pycfbridge.c b/Mac/Modules/cf/pycfbridge.c index 21a952262c4..3e4b89a77d8 100644 --- a/Mac/Modules/cf/pycfbridge.c +++ b/Mac/Modules/cf/pycfbridge.c @@ -2,17 +2,7 @@ ** Convert objects from Python to CoreFoundation and vice-versa. */ -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#include -#include -#include -#include -#include -#else #include -#endif #include "Python.h" #include "macglue.h" diff --git a/Mac/Modules/cg/_CGmodule.c b/Mac/Modules/cg/_CGmodule.c index 3bc114c82b1..09b803c5a54 100755 --- a/Mac/Modules/cg/_CGmodule.c +++ b/Mac/Modules/cg/_CGmodule.c @@ -14,18 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #if !TARGET_API_MAC_OSX /* This code is adapted from the CallMachOFramework demo at: diff --git a/Mac/Modules/cg/cgsupport.py b/Mac/Modules/cg/cgsupport.py index 7456b55d9d5..a8372f2472c 100755 --- a/Mac/Modules/cg/cgsupport.py +++ b/Mac/Modules/cg/cgsupport.py @@ -23,12 +23,7 @@ RgnHandle = OpaqueByValueType("RgnHandle", "ResObj") # Create the type objects includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #if !TARGET_API_MAC_OSX /* This code is adapted from the CallMachOFramework demo at: diff --git a/Mac/Modules/cm/_Cmmodule.c b/Mac/Modules/cm/_Cmmodule.c index 7abdaa966e2..f9b1bf7b959 100644 --- a/Mac/Modules/cm/_Cmmodule.c +++ b/Mac/Modules/cm/_Cmmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_CmpObj_New(Component); diff --git a/Mac/Modules/cm/cmsupport.py b/Mac/Modules/cm/cmsupport.py index 2468193dcda..98018c45687 100644 --- a/Mac/Modules/cm/cmsupport.py +++ b/Mac/Modules/cm/cmsupport.py @@ -21,11 +21,7 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_CmpObj_New(Component); diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c index 98c6f4f05be..60fcef413c6 100644 --- a/Mac/Modules/ctl/_Ctlmodule.c +++ b/Mac/Modules/ctl/_Ctlmodule.c @@ -14,18 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_CtlObj_New(ControlHandle); diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index 2fc51cfd9a0..b2d9ad55f66 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -113,12 +113,7 @@ ControlSliderOrientation = UInt16 includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_CtlObj_New(ControlHandle); diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c index 3e0bc6df7c7..966e1ff7525 100644 --- a/Mac/Modules/dlg/_Dlgmodule.c +++ b/Mac/Modules/dlg/_Dlgmodule.c @@ -20,11 +20,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_DlgObj_New(DialogRef); diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index 1b561d97b76..85bc607e811 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -31,11 +31,7 @@ StringPtr = Str255 EventMask = Type("EventMask", "H") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_DlgObj_New(DialogRef); diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c index 3b00da81376..79f03849cf6 100644 --- a/Mac/Modules/drag/_Dragmodule.c +++ b/Mac/Modules/drag/_Dragmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* Callback glue routines */ DragTrackingHandlerUPP dragglue_TrackingHandlerUPP; diff --git a/Mac/Modules/drag/dragsupport.py b/Mac/Modules/drag/dragsupport.py index 84c71a5ed76..c200950428a 100644 --- a/Mac/Modules/drag/dragsupport.py +++ b/Mac/Modules/drag/dragsupport.py @@ -44,11 +44,7 @@ FlavorFlags = Type("FlavorFlags", "l") DragTrackingMessage = Type("DragTrackingMessage", "h") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* Callback glue routines */ DragTrackingHandlerUPP dragglue_TrackingHandlerUPP; diff --git a/Mac/Modules/evt/_Evtmodule.c b/Mac/Modules/evt/_Evtmodule.c index 48c878d1ac1..9f62a2f7c99 100644 --- a/Mac/Modules/evt/_Evtmodule.c +++ b/Mac/Modules/evt/_Evtmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif static PyObject *Evt_Error; diff --git a/Mac/Modules/evt/evtsupport.py b/Mac/Modules/evt/evtsupport.py index 7dd7258a8f4..ccdc1c59aaf 100644 --- a/Mac/Modules/evt/evtsupport.py +++ b/Mac/Modules/evt/evtsupport.py @@ -35,11 +35,7 @@ EventMask = Type("EventMask", "H") EventKind = Type("EventKind", "H") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif """ diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c index 5a1cafd514d..9d6e371401e 100644 --- a/Mac/Modules/file/_Filemodule.c +++ b/Mac/Modules/file/_Filemodule.c @@ -20,11 +20,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern int _PyMac_GetFSSpec(PyObject *v, FSSpec *spec); diff --git a/Mac/Modules/file/filesupport.py b/Mac/Modules/file/filesupport.py index 7223038b10f..9fa8edd8498 100644 --- a/Mac/Modules/file/filesupport.py +++ b/Mac/Modules/file/filesupport.py @@ -122,11 +122,7 @@ FSCatalogInfo_ptr = OpaqueType("FSCatalogInfo", "FSCatalogInfo") #FSSpecArrayPtr includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern int _PyMac_GetFSSpec(PyObject *v, FSSpec *spec); diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c index 095fe3a42e1..cba96e02fea 100644 --- a/Mac/Modules/fm/_Fmmodule.c +++ b/Mac/Modules/fm/_Fmmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* diff --git a/Mac/Modules/fm/fmsupport.py b/Mac/Modules/fm/fmsupport.py index 20ae2923545..07b944eac47 100644 --- a/Mac/Modules/fm/fmsupport.py +++ b/Mac/Modules/fm/fmsupport.py @@ -26,11 +26,7 @@ TextBuffer = RevVarInputBufferType() includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* diff --git a/Mac/Modules/folder/_Foldermodule.c b/Mac/Modules/folder/_Foldermodule.c index 07d7bf544b9..9c7afc666be 100644 --- a/Mac/Modules/folder/_Foldermodule.c +++ b/Mac/Modules/folder/_Foldermodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif static PyObject *Folder_Error; diff --git a/Mac/Modules/folder/foldersupport.py b/Mac/Modules/folder/foldersupport.py index 92003e8396f..b9246150928 100644 --- a/Mac/Modules/folder/foldersupport.py +++ b/Mac/Modules/folder/foldersupport.py @@ -29,11 +29,7 @@ RoutingFlags = Type("RoutingFlags", "l") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif """ diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c index 66abdeb398b..8bd42705819 100644 --- a/Mac/Modules/help/_Helpmodule.c +++ b/Mac/Modules/help/_Helpmodule.c @@ -14,20 +14,16 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif static PyObject *Help_Error; diff --git a/Mac/Modules/help/helpsupport.py b/Mac/Modules/help/helpsupport.py index 8d2237e3c0e..230ec0c57f8 100644 --- a/Mac/Modules/help/helpsupport.py +++ b/Mac/Modules/help/helpsupport.py @@ -39,11 +39,7 @@ includestuff = includestuff + """ #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif """ class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition): diff --git a/Mac/Modules/ibcarbon/IBCarbonsupport.py b/Mac/Modules/ibcarbon/IBCarbonsupport.py index 25406c7168d..04d4bc135ce 100644 --- a/Mac/Modules/ibcarbon/IBCarbonsupport.py +++ b/Mac/Modules/ibcarbon/IBCarbonsupport.py @@ -9,11 +9,7 @@ IBCarbonFunction = OSErrFunctionGenerator IBCarbonMethod = OSErrMethodGenerator includestuff = """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* WITHOUT_FRAMEWORKS */ #include "macglue.h" #ifdef USE_TOOLBOX_OBJECT_GLUE diff --git a/Mac/Modules/ibcarbon/_IBCarbon.c b/Mac/Modules/ibcarbon/_IBCarbon.c index 1a712c690a4..1d50db2ba42 100644 --- a/Mac/Modules/ibcarbon/_IBCarbon.c +++ b/Mac/Modules/ibcarbon/_IBCarbon.c @@ -5,11 +5,7 @@ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* WITHOUT_FRAMEWORKS */ #include "macglue.h" #ifdef USE_TOOLBOX_OBJECT_GLUE diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c index ac4987509ea..7ed2064e0a3 100644 --- a/Mac/Modules/icn/_Icnmodule.c +++ b/Mac/Modules/icn/_Icnmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif static PyObject *Icn_Error; diff --git a/Mac/Modules/icn/icnsupport.py b/Mac/Modules/icn/icnsupport.py index 6f72235b8fc..9b4a68fbe2d 100644 --- a/Mac/Modules/icn/icnsupport.py +++ b/Mac/Modules/icn/icnsupport.py @@ -46,11 +46,7 @@ RGBColor = OpaqueType("RGBColor", "QdRGB") #EventKind = Type("EventKind", "H") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif """ diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c index 05af28e2b90..cf9480198d8 100644 --- a/Mac/Modules/list/_Listmodule.c +++ b/Mac/Modules/list/_Listmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ListObj_New(ListHandle); @@ -34,31 +30,6 @@ extern int _ListObj_Convert(PyObject *, ListHandle *); #define ListObj_Convert _ListObj_Convert #endif -#if !ACCESSOR_CALLS_ARE_FUNCTIONS -#define GetListPort(list) ((CGrafPtr)(*(list))->port) -#define GetListVerticalScrollBar(list) ((*(list))->vScroll) -#define GetListHorizontalScrollBar(list) ((*(list))->hScroll) -#define GetListActive(list) ((*(list))->lActive) -#define GetListClickTime(list) ((*(list))->clikTime) -#define GetListRefCon(list) ((*(list))->refCon) -#define GetListDefinition(list) ((*(list))->listDefProc) /* XXX Is this indeed the same? */ -#define GetListUserHandle(list) ((*(list))->userHandle) -#define GetListDataHandle(list) ((*(list))->cells) -#define GetListFlags(list) ((*(list))->listFlags) -#define GetListSelectionFlags(list) ((*(list))->selFlags) -#define SetListViewBounds(list, bounds) (((*(list))->rView) = *(bounds)) - -#define SetListPort(list, port) (((*(list))->port) = (GrafPtr)(port)) -#define SetListCellIndent(list, ind) (((*(list))->indent) = *(ind)) -#define SetListClickTime(list, time) (((*(list))->clikTime) = (time)) -#define SetListLastClick(list, click) (((*(list)->lastClick) = *(click)) -#define SetListRefCon(list, refcon) (((*(list))->refCon) = (refcon)) -#define SetListUserHandle(list, handle) (((*(list))->userHandle) = (handle)) -#define SetListFlags(list, flags) (((*(list))->listFlags) = (flags)) -#define SetListSelectionFlags(list, flags) (((*(list))->selFlags) = (flags)) - -#endif - #define as_List(x) ((ListHandle)x) #define as_Resource(lh) ((Handle)lh) diff --git a/Mac/Modules/list/listsupport.py b/Mac/Modules/list/listsupport.py index ab7cc3a3083..e44317a963d 100644 --- a/Mac/Modules/list/listsupport.py +++ b/Mac/Modules/list/listsupport.py @@ -39,11 +39,7 @@ CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj") EventModifiers = Type("EventModifiers", "H") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ListObj_New(ListHandle); @@ -53,31 +49,6 @@ extern int _ListObj_Convert(PyObject *, ListHandle *); #define ListObj_Convert _ListObj_Convert #endif -#if !ACCESSOR_CALLS_ARE_FUNCTIONS -#define GetListPort(list) ((CGrafPtr)(*(list))->port) -#define GetListVerticalScrollBar(list) ((*(list))->vScroll) -#define GetListHorizontalScrollBar(list) ((*(list))->hScroll) -#define GetListActive(list) ((*(list))->lActive) -#define GetListClickTime(list) ((*(list))->clikTime) -#define GetListRefCon(list) ((*(list))->refCon) -#define GetListDefinition(list) ((*(list))->listDefProc) /* XXX Is this indeed the same? */ -#define GetListUserHandle(list) ((*(list))->userHandle) -#define GetListDataHandle(list) ((*(list))->cells) -#define GetListFlags(list) ((*(list))->listFlags) -#define GetListSelectionFlags(list) ((*(list))->selFlags) -#define SetListViewBounds(list, bounds) (((*(list))->rView) = *(bounds)) - -#define SetListPort(list, port) (((*(list))->port) = (GrafPtr)(port)) -#define SetListCellIndent(list, ind) (((*(list))->indent) = *(ind)) -#define SetListClickTime(list, time) (((*(list))->clikTime) = (time)) -#define SetListLastClick(list, click) (((*(list)->lastClick) = *(click)) -#define SetListRefCon(list, refcon) (((*(list))->refCon) = (refcon)) -#define SetListUserHandle(list, handle) (((*(list))->userHandle) = (handle)) -#define SetListFlags(list, flags) (((*(list))->listFlags) = (flags)) -#define SetListSelectionFlags(list, flags) (((*(list))->selFlags) = (flags)) - -#endif - #define as_List(x) ((ListHandle)x) #define as_Resource(lh) ((Handle)lh) diff --git a/Mac/Modules/menu/_Menumodule.c b/Mac/Modules/menu/_Menumodule.c index 4e3aa20d87c..c48edb14053 100644 --- a/Mac/Modules/menu/_Menumodule.c +++ b/Mac/Modules/menu/_Menumodule.c @@ -14,18 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include /* Defines OpenDeskAcc in universal headers */ -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE @@ -37,16 +32,6 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *); #define MenuObj_Convert _MenuObj_Convert #endif -#if !ACCESSOR_CALLS_ARE_FUNCTIONS -#define GetMenuID(menu) ((*(menu))->menuID) -#define GetMenuWidth(menu) ((*(menu))->menuWidth) -#define GetMenuHeight(menu) ((*(menu))->menuHeight) - -#define SetMenuID(menu, id) ((*(menu))->menuID = (id)) -#define SetMenuWidth(menu, width) ((*(menu))->menuWidth = (width)) -#define SetMenuHeight(menu, height) ((*(menu))->menuHeight = (height)) -#endif - #define as_Menu(h) ((MenuHandle)h) #define as_Resource(h) ((Handle)h) diff --git a/Mac/Modules/menu/menusupport.py b/Mac/Modules/menu/menusupport.py index 6c8229cc720..7c4ae0d560f 100644 --- a/Mac/Modules/menu/menusupport.py +++ b/Mac/Modules/menu/menusupport.py @@ -39,12 +39,7 @@ FMFontStyle = Type("FMFontStyle", "h") UniChar = Type("UniChar", "h") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include /* Defines OpenDeskAcc in universal headers */ -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE @@ -56,16 +51,6 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *); #define MenuObj_Convert _MenuObj_Convert #endif -#if !ACCESSOR_CALLS_ARE_FUNCTIONS -#define GetMenuID(menu) ((*(menu))->menuID) -#define GetMenuWidth(menu) ((*(menu))->menuWidth) -#define GetMenuHeight(menu) ((*(menu))->menuHeight) - -#define SetMenuID(menu, id) ((*(menu))->menuID = (id)) -#define SetMenuWidth(menu, width) ((*(menu))->menuWidth = (width)) -#define SetMenuHeight(menu, height) ((*(menu))->menuHeight = (height)) -#endif - #define as_Menu(h) ((MenuHandle)h) #define as_Resource(h) ((Handle)h) diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c index aebec02b5ef..18fdd45bc6e 100644 --- a/Mac/Modules/mlte/_Mltemodule.c +++ b/Mac/Modules/mlte/_Mltemodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* For now we declare them forward here. They'll go to mactoolbox later */ static PyObject *TXNObj_New(TXNObject); diff --git a/Mac/Modules/mlte/mltesupport.py b/Mac/Modules/mlte/mltesupport.py index fe34fc77a05..862d0bc898b 100644 --- a/Mac/Modules/mlte/mltesupport.py +++ b/Mac/Modules/mlte/mltesupport.py @@ -20,11 +20,7 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* For now we declare them forward here. They'll go to mactoolbox later */ static PyObject *TXNObj_New(TXNObject); diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c index f2994dbca27..e15f84870df 100644 --- a/Mac/Modules/qd/_Qdmodule.c +++ b/Mac/Modules/qd/_Qdmodule.c @@ -20,11 +20,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GrafObj_New(GrafPtr); @@ -42,69 +38,6 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr); #define QdRGB_Convert _QdRGB_Convert #endif -#if !ACCESSOR_CALLS_ARE_FUNCTIONS -#define GetPortBitMapForCopyBits(port) ((const struct BitMap *)&((GrafPort *)(port))->portBits) -#define GetPortPixMap(port) (((CGrafPtr)(port))->portPixMap) -#define GetPortBounds(port, bounds) (*(bounds) = (port)->portRect, (bounds)) -#define GetPortForeColor(port, color) (*(color) = (port)->rgbFgColor, (color)) -#define GetPortBackColor(port, color) (*(color) = (port)->rgbBkColor, (color)) -#define GetPortOpColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbOpColor, (color)) -#define GetPortHiliteColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbHiliteColor, (color)) -#define GetPortTextFont(port) ((port)->txFont) -#define GetPortTextFace(port) ((port)->txFace) -#define GetPortTextMode(port) ((port)->txMode) -#define GetPortTextSize(port) ((port)->txSize) -#define GetPortChExtra(port) ((port)->chExtra) -#define GetPortFracHPenLocation(port) ((port)->pnLocHFrac) -#define GetPortSpExtra(port) ((port)->spExtra) -#define GetPortPenVisibility(port) ((port)->pnVis) -#define GetPortVisibleRegion(port, rgn) ((rgn) = (port)->visRgn, (rgn)) -#define GetPortClipRegion(port, rgn) ((rgn) = (port)->clipRgn, (rgn)) -#define GetPortBackPixPat(port, pat) ((pat) = (port)->bkPixPat, (pat)) -#define GetPortPenPixPat(port, pat) ((pat) = (port)->pnPixPat, (pat)) -#define GetPortFillPixPat(port, pat) ((pat) = (port)->fillPixPat, (pat)) -#define GetPortPenSize(port, pensize) (*(pensize) = (port)->pnSize, (pensize)) -#define GetPortPenMode(port) ((port)->pnMode) -#define GetPortPenLocation(port, location) ((*location) = (port)->pnLoc, (location)) -#define IsPortRegionBeingDefined(port) (!!((port)->rgnSave)) -#define IsPortPictureBeingDefined(port) (!!((port)->picSave)) -/* #define IsPortOffscreen(port) */ -/* #define IsPortColor(port) */ - -#define SetPortBounds(port, bounds) ((port)->portRect = *(bounds)) -#define SetPortOpColor(port, color) ((*(GVarHandle)((port)->grafVars))->rgbOpColor = *(color)) -#define SetPortVisibleRegion(port, rgn) ((port)->visRgn = (rgn)) -#define SetPortClipRegion(port, rgn) ((port)->clipRgn = (rgn)) -#define SetPortBackPixPat(port, pat) ((port)->bkPixPat = (pat)) -#define SetPortPenPixPat(port, pat) ((port)->pnPixPat = (pat)) -#define SetPortFillPixPat(port, pat) ((port)->fillPixPat = (pat)) -#define SetPortPenSize(port, pensize) ((port)->pnSize = (pensize)) -#define SetPortPenMode(port, mode) ((port)->pnMode = (mode)) -#define SetPortFracHPenLocation(port, frac) ((port)->pnLocHFrac = (frac)) - -/* On pixmaps */ -#define GetPixBounds(pixmap, rect) (*(rect) = (*(pixmap))->bounds, (rect)) -#define GetPixDepth(pixmap) ((*(pixmap))->pixelSize) - -/* On regions */ -#define GetRegionBounds(rgn, rect) (*(rect) = (*(rgn))->rgnBBox, (rect)) - -/* On QD Globals */ -#define GetQDGlobalsRandomSeed() (qd.randSeed) -#define GetQDGlobalsScreenBits(bits) (*(bits) = qd.screenBits, (bits)) -#define GetQDGlobalsArrow(crsr) (*(crsr) = qd.arrow, (crsr)) -#define GetQDGlobalsDarkGray(pat) (*(pat) = qd.dkGray, (pat)) -#define GetQDGlobalsLightGray(pat) (*(pat) = qd.ltGray, (pat)) -#define GetQDGlobalsGray(pat) (*(pat) = qd.gray, (pat)) -#define GetQDGlobalsBlack(pat) (*(pat) = qd.black, (pat)) -#define GetQDGlobalsWhite(pat) (*(pat) = qd.white, (pat)) -#define GetQDGlobalsThePort() ((CGrafPtr)qd.thePort) - -#define SetQDGlobalsRandomSeed(seed) (qd.randSeed = (seed)) -#define SetQDGlobalsArrow(crsr) (qd.arrow = *(crsr)) - -#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */ - static PyObject *BMObj_NewCopied(BitMapPtr); /* diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py index 18e628f598e..e361c01af7a 100644 --- a/Mac/Modules/qd/qdsupport.py +++ b/Mac/Modules/qd/qdsupport.py @@ -66,11 +66,7 @@ PenState_ptr = StructInputBufferType('PenState') TruncCode = Type("TruncCode", "h") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GrafObj_New(GrafPtr); @@ -88,69 +84,6 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr); #define QdRGB_Convert _QdRGB_Convert #endif -#if !ACCESSOR_CALLS_ARE_FUNCTIONS -#define GetPortBitMapForCopyBits(port) ((const struct BitMap *)&((GrafPort *)(port))->portBits) -#define GetPortPixMap(port) (((CGrafPtr)(port))->portPixMap) -#define GetPortBounds(port, bounds) (*(bounds) = (port)->portRect, (bounds)) -#define GetPortForeColor(port, color) (*(color) = (port)->rgbFgColor, (color)) -#define GetPortBackColor(port, color) (*(color) = (port)->rgbBkColor, (color)) -#define GetPortOpColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbOpColor, (color)) -#define GetPortHiliteColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbHiliteColor, (color)) -#define GetPortTextFont(port) ((port)->txFont) -#define GetPortTextFace(port) ((port)->txFace) -#define GetPortTextMode(port) ((port)->txMode) -#define GetPortTextSize(port) ((port)->txSize) -#define GetPortChExtra(port) ((port)->chExtra) -#define GetPortFracHPenLocation(port) ((port)->pnLocHFrac) -#define GetPortSpExtra(port) ((port)->spExtra) -#define GetPortPenVisibility(port) ((port)->pnVis) -#define GetPortVisibleRegion(port, rgn) ((rgn) = (port)->visRgn, (rgn)) -#define GetPortClipRegion(port, rgn) ((rgn) = (port)->clipRgn, (rgn)) -#define GetPortBackPixPat(port, pat) ((pat) = (port)->bkPixPat, (pat)) -#define GetPortPenPixPat(port, pat) ((pat) = (port)->pnPixPat, (pat)) -#define GetPortFillPixPat(port, pat) ((pat) = (port)->fillPixPat, (pat)) -#define GetPortPenSize(port, pensize) (*(pensize) = (port)->pnSize, (pensize)) -#define GetPortPenMode(port) ((port)->pnMode) -#define GetPortPenLocation(port, location) ((*location) = (port)->pnLoc, (location)) -#define IsPortRegionBeingDefined(port) (!!((port)->rgnSave)) -#define IsPortPictureBeingDefined(port) (!!((port)->picSave)) -/* #define IsPortOffscreen(port) */ -/* #define IsPortColor(port) */ - -#define SetPortBounds(port, bounds) ((port)->portRect = *(bounds)) -#define SetPortOpColor(port, color) ((*(GVarHandle)((port)->grafVars))->rgbOpColor = *(color)) -#define SetPortVisibleRegion(port, rgn) ((port)->visRgn = (rgn)) -#define SetPortClipRegion(port, rgn) ((port)->clipRgn = (rgn)) -#define SetPortBackPixPat(port, pat) ((port)->bkPixPat = (pat)) -#define SetPortPenPixPat(port, pat) ((port)->pnPixPat = (pat)) -#define SetPortFillPixPat(port, pat) ((port)->fillPixPat = (pat)) -#define SetPortPenSize(port, pensize) ((port)->pnSize = (pensize)) -#define SetPortPenMode(port, mode) ((port)->pnMode = (mode)) -#define SetPortFracHPenLocation(port, frac) ((port)->pnLocHFrac = (frac)) - -/* On pixmaps */ -#define GetPixBounds(pixmap, rect) (*(rect) = (*(pixmap))->bounds, (rect)) -#define GetPixDepth(pixmap) ((*(pixmap))->pixelSize) - -/* On regions */ -#define GetRegionBounds(rgn, rect) (*(rect) = (*(rgn))->rgnBBox, (rect)) - -/* On QD Globals */ -#define GetQDGlobalsRandomSeed() (qd.randSeed) -#define GetQDGlobalsScreenBits(bits) (*(bits) = qd.screenBits, (bits)) -#define GetQDGlobalsArrow(crsr) (*(crsr) = qd.arrow, (crsr)) -#define GetQDGlobalsDarkGray(pat) (*(pat) = qd.dkGray, (pat)) -#define GetQDGlobalsLightGray(pat) (*(pat) = qd.ltGray, (pat)) -#define GetQDGlobalsGray(pat) (*(pat) = qd.gray, (pat)) -#define GetQDGlobalsBlack(pat) (*(pat) = qd.black, (pat)) -#define GetQDGlobalsWhite(pat) (*(pat) = qd.white, (pat)) -#define GetQDGlobalsThePort() ((CGrafPtr)qd.thePort) - -#define SetQDGlobalsRandomSeed(seed) (qd.randSeed = (seed)) -#define SetQDGlobalsArrow(crsr) (qd.arrow = *(crsr)) - -#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */ - static PyObject *BMObj_NewCopied(BitMapPtr); /* diff --git a/Mac/Modules/qdoffs/_Qdoffsmodule.c b/Mac/Modules/qdoffs/_Qdoffsmodule.c index 8d9f7efd0d0..5bc0f968b2a 100644 --- a/Mac/Modules/qdoffs/_Qdoffsmodule.c +++ b/Mac/Modules/qdoffs/_Qdoffsmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GWorldObj_New(GWorldPtr); diff --git a/Mac/Modules/qdoffs/qdoffssupport.py b/Mac/Modules/qdoffs/qdoffssupport.py index 0c4dd2ae4f8..1bd8f5ab586 100644 --- a/Mac/Modules/qdoffs/qdoffssupport.py +++ b/Mac/Modules/qdoffs/qdoffssupport.py @@ -34,11 +34,7 @@ GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj") QDErr = OSErrType("QDErr", 'h') includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GWorldObj_New(GWorldPtr); diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c index 66bca4ba2f5..fd5db6fa2ae 100644 --- a/Mac/Modules/qt/_Qtmodule.c +++ b/Mac/Modules/qt/_Qtmodule.c @@ -20,12 +20,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else -/* #include */ #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE diff --git a/Mac/Modules/qt/qtsupport.py b/Mac/Modules/qt/qtsupport.py index c4e165362c4..589b8379787 100644 --- a/Mac/Modules/qt/qtsupport.py +++ b/Mac/Modules/qt/qtsupport.py @@ -24,12 +24,7 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else -/* #include */ #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c index e759269db0d..0737b19dc46 100644 --- a/Mac/Modules/res/_Resmodule.c +++ b/Mac/Modules/res/_Resmodule.c @@ -14,21 +14,16 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ResObj_New(Handle); diff --git a/Mac/Modules/res/ressupport.py b/Mac/Modules/res/ressupport.py index 37cb6600bc9..91ab00a1c94 100644 --- a/Mac/Modules/res/ressupport.py +++ b/Mac/Modules/res/ressupport.py @@ -28,12 +28,7 @@ includestuff = includestuff + """ #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ResObj_New(Handle); diff --git a/Mac/Modules/scrap/_Scrapmodule.c b/Mac/Modules/scrap/_Scrapmodule.c index 288c65afa9c..db8e58be24b 100644 --- a/Mac/Modules/scrap/_Scrapmodule.c +++ b/Mac/Modules/scrap/_Scrapmodule.c @@ -23,11 +23,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif static PyObject *Scrap_Error; diff --git a/Mac/Modules/scrap/scrapsupport.py b/Mac/Modules/scrap/scrapsupport.py index b89b405e8f6..85c1e3b930d 100644 --- a/Mac/Modules/scrap/scrapsupport.py +++ b/Mac/Modules/scrap/scrapsupport.py @@ -29,11 +29,7 @@ includestuff = includestuff + """ #ifndef PyDoc_STR #define PyDoc_STR(x) (x) #endif -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif /* ** Generate ScrapInfo records diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c index 0075c986be2..b8f5c33b241 100644 --- a/Mac/Modules/snd/_Sndmodule.c +++ b/Mac/Modules/snd/_Sndmodule.c @@ -14,18 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#include /* for Set(Current)A5 */ -#else #include -#endif /* Convert a SndCommand argument */ static int @@ -1150,11 +1145,8 @@ void init_Snd(void) PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type); SPB_Type.ob_type = &PyType_Type; if (PyType_Ready(&SPB_Type) < 0) return; -#if 0 - /* This would shadow the SPB routine, which is bad news (it is important) */ Py_INCREF(&SPB_Type); PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type); -#endif /* Backward-compatible name */ Py_INCREF(&SPB_Type); PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type); diff --git a/Mac/Modules/snd/sndsupport.py b/Mac/Modules/snd/sndsupport.py index 105fc661237..99df5bed8a2 100644 --- a/Mac/Modules/snd/sndsupport.py +++ b/Mac/Modules/snd/sndsupport.py @@ -17,12 +17,7 @@ class SndMethod(SndMixIn, OSErrMethodGenerator): pass # includestuff etc. are imported from macsupport includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#include /* for Set(Current)A5 */ -#else #include -#endif """ initstuff = initstuff + """ diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c index 2da25135076..c440640d178 100644 --- a/Mac/Modules/te/_TEmodule.c +++ b/Mac/Modules/te/_TEmodule.c @@ -14,17 +14,13 @@ /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ - PyErr_SetString(PyExc_NotImplementedError, \ - "Not available in this shared library/OS version"); \ - return NULL; \ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_TEObj_New(TEHandle); diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py index cac020b58e8..13f1b9734d1 100644 --- a/Mac/Modules/te/tesupport.py +++ b/Mac/Modules/te/tesupport.py @@ -32,11 +32,7 @@ TextStyle = OpaqueType("TextStyle", "TextStyle") TextStyle_ptr = TextStyle includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_TEObj_New(TEHandle); diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index d1b3ada32dd..d88a5bcc372 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -20,11 +20,7 @@ }} while(0) -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_WinObj_New(WindowRef); diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py index d99ca1eb637..640e33a7f9c 100644 --- a/Mac/Modules/win/winsupport.py +++ b/Mac/Modules/win/winsupport.py @@ -58,11 +58,7 @@ PropertyCreator = OSTypeType("PropertyCreator") PropertyTag = OSTypeType("PropertyTag") includestuff = includestuff + """ -#ifdef WITHOUT_FRAMEWORKS -#include -#else #include -#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_WinObj_New(WindowRef);