]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Get rid of support for Universal Headers older than 3.4 and various other
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 13 Dec 2002 15:02:02 +0000 (15:02 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 13 Dec 2002 15:02:02 +0000 (15:02 +0000)
outdated things.

Mac/Modules/ae/_AEmodule.c
Mac/Modules/ae/aesupport.py
Mac/Modules/dlg/_Dlgmodule.c
Mac/Modules/dlg/dlgsupport.py
Mac/Modules/hfsplusmodule.c
Mac/Modules/waste/wastemodule.c
Mac/Modules/waste/wastesupport.py
Mac/Modules/win/_Winmodule.c
Mac/Modules/win/winsupport.py
Mac/Python/macgetargv.c

index ab54ca0674d9819bee1c465ac5f36af0da1ae2e9..14f03056cad2f1de55bf552dfc39d6c6b2829dba 100644 (file)
@@ -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);
 
index 346340ba0dd9660a6c647e0a8bd1d613cbc16be6..16b9c5d50b2401a4dbfaaeb529c99124c548284c 100644 (file)
@@ -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);
 """
index 70db0f882488404601ec97ce31e6958717b535ff..94f4fcb38ca761a1733b4e54a522e341a035e9da 100644 (file)
@@ -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;
 
index a1a6753eae63f075eb62e6cdc38c3f2065248a13..1b561d97b76fa0d0a21b9a64f86ce26be19045c2 100644 (file)
@@ -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;
 
index 1c690311df873d3bb391a461c467314cae8b1647..da48eb01fac20cf363c2a81963a4014930685b53 100644 (file)
@@ -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;
index aa31e30e914f93c164d873c0ce3dccc6f8308fdf..c5e3941431ebffaf157eafb48050b17b3bbed709 100644 (file)
@@ -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,
index fc891ef44e31247eec3fe87b079a1775afdd9a08..2e165a93d27e52061dcedea972dbaeca78844da2 100644 (file)
@@ -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,
index db3e31e5c9933d84409b23646ebbf98e7be7f950..ef75cbab0cfd1ca0a999fb8428d95b217bce7c44 100644 (file)
@@ -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
index 5d041d6367a34310f9a8dbde603c9052da6373c3..d99ca1eb637e529ba2130c808458c6cc41771341 100644 (file)
@@ -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
index 180de33d13c9e6bbb71bb72ecffc5057a67727ba..f301bab0746da9b76059d79b63509b682bcc501c 100644 (file)
@@ -45,11 +45,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <Carbon/Carbon.h>
 #endif /* WITHOUT_FRAMEWORKS */
 
-#if UNIVERSAL_INTERFACES_VERSION >= 0x0340
 typedef long refcontype;
-#else
-typedef unsigned long refcontype;
-#endif
 
 #include "Python.h"
 #include "macglue.h"