diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-07-14 22:37:27 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-07-14 22:37:27 (GMT) |
commit | 74a1e63a89cdaad288260600cf77e3a20811f49b (patch) | |
tree | fcac57d67ef4a81ecfb8ae462dc3d254e9cf46be /Mac/Modules/ctl/ctlsupport.py | |
parent | 2d391f2f397d66e2ac3cadc0b3c3b008a57094bb (diff) | |
download | cpython-74a1e63a89cdaad288260600cf77e3a20811f49b.zip cpython-74a1e63a89cdaad288260600cf77e3a20811f49b.tar.gz cpython-74a1e63a89cdaad288260600cf77e3a20811f49b.tar.bz2 |
Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef.
Diffstat (limited to 'Mac/Modules/ctl/ctlsupport.py')
-rw-r--r-- | Mac/Modules/ctl/ctlsupport.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index 25cd520..064e1c5 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -48,7 +48,7 @@ staticforward PyObject *CtlObj_WhichControl(ControlHandle); #define as_Control(h) ((ControlHandle)h) #define as_Resource(ctl) ((Handle)ctl) -#ifdef TARGET_API_MAC_CARBON +#if TARGET_API_MAC_CARBON #define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp) #else #define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect)) @@ -83,7 +83,7 @@ ControlFontStyle_Convert(v, itself) /* TrackControl and HandleControlClick callback support */ static PyObject *tracker; static ControlActionUPP mytracker_upp; -#ifndef TARGET_API_MAC_CARBON_NOTYET +#if !TARGET_API_MAC_CARBON_NOTYET static ControlUserPaneDrawUPP mydrawproc_upp; static ControlUserPaneIdleUPP myidleproc_upp; static ControlUserPaneHitTestUPP myhittestproc_upp; @@ -92,7 +92,7 @@ static ControlUserPaneTrackingUPP mytrackingproc_upp; extern int settrackfunc(PyObject *); /* forward */ extern void clrtrackfunc(void); /* forward */ -#ifndef TARGET_API_MAC_CARBON_NOTYET +#if !TARGET_API_MAC_CARBON_NOTYET staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *); #endif """ @@ -166,7 +166,7 @@ mytracker(ControlHandle ctl, short part) PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n"); } -#ifndef TARGET_API_MAC_CARBON_NOTYET +#if !TARGET_API_MAC_CARBON_NOTYET static int setcallback(myself, which, callback, uppp) PyObject *myself; @@ -288,7 +288,7 @@ mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc initstuff = initstuff + """ mytracker_upp = NewControlActionProc(mytracker); -#ifndef TARGET_API_MAC_CARBON_NOTYET +#if !TARGET_API_MAC_CARBON_NOTYET mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc); myidleproc_upp = NewControlUserPaneIdleProc(myidleproc); myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc); @@ -570,7 +570,7 @@ _res = Py_None; return _res; """ -f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET"); +f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET"); f.docstring = lambda: "(callbackfunc) -> None" object.add(f) @@ -588,7 +588,7 @@ _res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID); HUnlock((Handle)hdl); return _res; """ -f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET") +f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET") object.add(f) setpopupdata_body = """ @@ -608,7 +608,7 @@ hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData; Py_INCREF(Py_None); return Py_None; """ -f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET") +f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET") object.add(f) |