diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-13 15:02:02 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-13 15:02:02 (GMT) |
commit | 65cbf93fce1eaf6cfc89b93e9a5c798b4ac81aa0 (patch) | |
tree | 97ea112375ea86c214559e5dc0eeddc434e93132 /Mac/Modules | |
parent | 55309a31df89d83c996426413915c1717b367a8d (diff) | |
download | cpython-65cbf93fce1eaf6cfc89b93e9a5c798b4ac81aa0.zip cpython-65cbf93fce1eaf6cfc89b93e9a5c798b4ac81aa0.tar.gz cpython-65cbf93fce1eaf6cfc89b93e9a5c798b4ac81aa0.tar.bz2 |
Get rid of support for Universal Headers older than 3.4 and various other
outdated things.
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/ae/_AEmodule.c | 8 | ||||
-rw-r--r-- | Mac/Modules/ae/aesupport.py | 8 | ||||
-rw-r--r-- | Mac/Modules/dlg/_Dlgmodule.c | 7 | ||||
-rw-r--r-- | Mac/Modules/dlg/dlgsupport.py | 7 | ||||
-rw-r--r-- | Mac/Modules/hfsplusmodule.c | 8 | ||||
-rw-r--r-- | Mac/Modules/waste/wastemodule.c | 10 | ||||
-rw-r--r-- | Mac/Modules/waste/wastesupport.py | 10 | ||||
-rw-r--r-- | Mac/Modules/win/_Winmodule.c | 11 | ||||
-rw-r--r-- | Mac/Modules/win/winsupport.py | 11 |
9 files changed, 6 insertions, 74 deletions
diff --git a/Mac/Modules/ae/_AEmodule.c b/Mac/Modules/ae/_AEmodule.c index ab54ca0..14f0305 100644 --- a/Mac/Modules/ae/_AEmodule.c +++ b/Mac/Modules/ae/_AEmodule.c @@ -38,11 +38,7 @@ extern int _AEDesc_Convert(PyObject *, AEDesc *); #define AEDesc_Convert _AEDesc_Convert #endif -#if UNIVERSAL_INTERFACES_VERSION >= 0x0340 typedef long refcontype; -#else -typedef unsigned long refcontype; -#endif static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */ @@ -1426,11 +1422,7 @@ void init_AE(void) upp_AEIdleProc = NewAEIdleUPP(AEIdleProc); -#if UNIVERSAL_INTERFACES_VERSION >= 0x03400 - upp_GenericEventHandler = NewAEEventHandlerUPP(&GenericEventHandler); -#else upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler); -#endif PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New); PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert); diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py index 346340b..16b9c5d 100644 --- a/Mac/Modules/ae/aesupport.py +++ b/Mac/Modules/ae/aesupport.py @@ -100,11 +100,7 @@ extern int _AEDesc_Convert(PyObject *, AEDesc *); #define AEDesc_Convert _AEDesc_Convert #endif -#if UNIVERSAL_INTERFACES_VERSION >= 0x0340 typedef long refcontype; -#else -typedef unsigned long refcontype; -#endif static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */ @@ -163,11 +159,7 @@ GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype ref initstuff = initstuff + """ upp_AEIdleProc = NewAEIdleUPP(AEIdleProc); -#if UNIVERSAL_INTERFACES_VERSION >= 0x03400 - upp_GenericEventHandler = NewAEEventHandlerUPP(&GenericEventHandler); -#else upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler); -#endif PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New); PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert); """ diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c index 70db0f8..94f4fcb 100644 --- a/Mac/Modules/dlg/_Dlgmodule.c +++ b/Mac/Modules/dlg/_Dlgmodule.c @@ -36,13 +36,6 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *); #define DlgObj_Convert _DlgObj_Convert #endif -#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)) -#define GetDialogFromWindow(win) ((DialogRef)(win)) -#endif - /* XXX Shouldn't this be a stack? */ static PyObject *Dlg_FilterProc_callback = NULL; diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index a1a6753..1b561d9 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -47,13 +47,6 @@ extern int _DlgObj_Convert(PyObject *, DialogRef *); #define DlgObj_Convert _DlgObj_Convert #endif -#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)) -#define GetDialogFromWindow(win) ((DialogRef)(win)) -#endif - /* XXX Shouldn't this be a stack? */ static PyObject *Dlg_FilterProc_callback = NULL; diff --git a/Mac/Modules/hfsplusmodule.c b/Mac/Modules/hfsplusmodule.c index 1c69031..da48eb0 100644 --- a/Mac/Modules/hfsplusmodule.c +++ b/Mac/Modules/hfsplusmodule.c @@ -1390,9 +1390,7 @@ static int cataloginfo_from_dict(FSCatalogInfoBitmap bitmap, FSCatalogInfo *info, const PyObject *dict) { UInt32 storage; -#if UNIVERSAL_INTERFACES_VERSION > 0x0332 FSPermissionInfo *permissions; -#endif // Dates if (fetch_utcdatetime(bitmap, kFSCatInfoCreateDate, dict, _kFSCatInfoCreateDate, &info->createDate)) return NULL; @@ -1401,7 +1399,6 @@ int cataloginfo_from_dict(FSCatalogInfoBitmap bitmap, FSCatalogInfo *info, const if (fetch_utcdatetime(bitmap, kFSCatInfoAccessDate, dict, _kFSCatInfoAccessDate, &info->accessDate)) return NULL; if (fetch_utcdatetime(bitmap, kFSCatInfoBackupDate, dict, _kFSCatInfoBackupDate, &info->backupDate)) return NULL; -#if UNIVERSAL_INTERFACES_VERSION > 0x0332 // Permissions permissions = (FSPermissionInfo *) info->permissions; if (fetch_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserID, &permissions->userID)) return NULL; @@ -1410,7 +1407,6 @@ int cataloginfo_from_dict(FSCatalogInfoBitmap bitmap, FSCatalogInfo *info, const permissions->mode = (UInt16) storage; if (fetch_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserAccess, &storage)) return NULL; permissions->userAccess = (UInt8) storage; -#endif // IDs if (fetch_long(bitmap, kFSCatInfoTextEncoding, dict, _kFSCatInfoTextEncoding, &info->textEncodingHint)) return NULL; if (fetch_long(bitmap, kFSCatInfoNodeFlags, dict, _kFSCatInfoNodeFlags, &storage)) return NULL; @@ -1441,9 +1437,7 @@ PyObject *dict_from_cataloginfo(FSCatalogInfoBitmap bitmap, const FSCatalogInfo { PyObject *dict; PyObject *id; -#if UNIVERSAL_INTERFACES_VERSION > 0x0332 FSPermissionInfo *permissions; -#endif char buffer[1024]; dict = PyDict_New(); @@ -1473,14 +1467,12 @@ PyObject *dict_from_cataloginfo(FSCatalogInfoBitmap bitmap, const FSCatalogInfo if (insert_longlong(bitmap, kFSCatInfoRsrcSizes, dict, _kFSCatInfoRsrcLogical, info->rsrcLogicalSize)) return NULL; if (insert_longlong(bitmap, kFSCatInfoRsrcSizes, dict, _kFSCatInfoRsrcPhysical, info->rsrcPhysicalSize)) return NULL; -#if UNIVERSAL_INTERFACES_VERSION > 0x0332 // Permissions permissions = (FSPermissionInfo *) info->permissions; if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserID, permissions->userID)) return NULL; if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoGroupID, permissions->groupID)) return NULL; if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserAccess, permissions->userAccess)) return NULL; if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoMode, permissions->mode)) return NULL; -#endif // Dates if (insert_utcdatetime(bitmap, kFSCatInfoCreateDate, dict, _kFSCatInfoCreateDate, &info->createDate)) return NULL; diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c index aa31e30..c5e3941 100644 --- a/Mac/Modules/waste/wastemodule.c +++ b/Mac/Modules/waste/wastemodule.c @@ -43,8 +43,7 @@ static PyObject *ExistingwasteObj_New(WEReference); ** Parse/generate TextStyle records */ static -PyObject *TextStyle_New(itself) - TextStylePtr itself; +PyObject *TextStyle_New(TextStylePtr itself) { return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New, @@ -52,9 +51,7 @@ PyObject *TextStyle_New(itself) } static -TextStyle_Convert(v, p_itself) - PyObject *v; - TextStylePtr p_itself; +TextStyle_Convert(PyObject *v, TextStylePtr p_itself) { long font, face, size; @@ -70,8 +67,7 @@ TextStyle_Convert(v, p_itself) ** Parse/generate RunInfo records */ static -PyObject *RunInfo_New(itself) - WERunInfo *itself; +PyObject *RunInfo_New(WERunInfo *itself) { return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight, diff --git a/Mac/Modules/waste/wastesupport.py b/Mac/Modules/waste/wastesupport.py index fc891ef..2e165a9 100644 --- a/Mac/Modules/waste/wastesupport.py +++ b/Mac/Modules/waste/wastesupport.py @@ -83,8 +83,7 @@ static PyObject *ExistingwasteObj_New(WEReference); ** Parse/generate TextStyle records */ static -PyObject *TextStyle_New(itself) - TextStylePtr itself; +PyObject *TextStyle_New(TextStylePtr itself) { return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New, @@ -92,9 +91,7 @@ PyObject *TextStyle_New(itself) } static -TextStyle_Convert(v, p_itself) - PyObject *v; - TextStylePtr p_itself; +TextStyle_Convert(PyObject *v, TextStylePtr p_itself) { long font, face, size; @@ -110,8 +107,7 @@ TextStyle_Convert(v, p_itself) ** Parse/generate RunInfo records */ static -PyObject *RunInfo_New(itself) - WERunInfo *itself; +PyObject *RunInfo_New(WERunInfo *itself) { return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight, diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index db3e31e..ef75cba 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -36,21 +36,10 @@ extern int _WinObj_Convert(PyObject *, WindowRef *); #define WinObj_Convert _WinObj_Convert #endif -#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 /* Classic calls that we emulate in carbon mode */ #define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn)) #define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn)) #define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn)) -#endif /* Function to dispose a window, with a "normal" calling sequence */ static void diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py index 5d041d6..d99ca1e 100644 --- a/Mac/Modules/win/winsupport.py +++ b/Mac/Modules/win/winsupport.py @@ -74,21 +74,10 @@ extern int _WinObj_Convert(PyObject *, WindowRef *); #define WinObj_Convert _WinObj_Convert #endif -#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 /* Classic calls that we emulate in carbon mode */ #define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn)) #define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn)) #define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn)) -#endif /* Function to dispose a window, with a "normal" calling sequence */ static void |