diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 (GMT) |
commit | 217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch) | |
tree | 4737b4a91359c94953623ab9ee297e9a90f319e4 /Mac | |
parent | 1a3284ed69d545e4ef59869998cb8c29233a45fa (diff) | |
download | cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2 |
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/MacOS.c | 2 | ||||
-rwxr-xr-x | Mac/Modules/carbonevt/_CarbonEvtmodule.c | 4 | ||||
-rw-r--r-- | Mac/Modules/cf/pycfbridge.c | 6 | ||||
-rw-r--r-- | Mac/Modules/ctl/_Ctlmodule.c | 4 | ||||
-rw-r--r-- | Mac/Modules/dlg/_Dlgmodule.c | 6 | ||||
-rw-r--r-- | Mac/Modules/gestaltmodule.c | 2 | ||||
-rw-r--r-- | Mac/Modules/qd/_Qdmodule.c | 4 | ||||
-rw-r--r-- | Mac/Modules/res/_Resmodule.c | 2 | ||||
-rw-r--r-- | Mac/Modules/snd/_Sndihooks.c | 2 | ||||
-rw-r--r-- | Mac/Modules/win/_Winmodule.c | 2 |
10 files changed, 17 insertions, 17 deletions
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c index 49215f5..350975b 100644 --- a/Mac/Modules/MacOS.c +++ b/Mac/Modules/MacOS.c @@ -195,7 +195,7 @@ rf_tell(rfobject *self, PyObject *args) PyMac_Error(err); return NULL; } - return PyInt_FromLong(where); + return PyLong_FromLong(where); } static char rf_close__doc__[] = diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c index 7b44228..725dae3 100755 --- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c +++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c @@ -102,8 +102,8 @@ myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject } else { if (retValue == Py_None) status = noErr; - else if (PyInt_Check(retValue)) { - status = PyInt_AsLong(retValue); + else if (PyLong_Check(retValue)) { + status = PyLong_AsLong(retValue); } else status = noErr; /* wrong object type, complain? */ Py_DECREF(retValue); diff --git a/Mac/Modules/cf/pycfbridge.c b/Mac/Modules/cf/pycfbridge.c index 06700b3..eb476ed 100644 --- a/Mac/Modules/cf/pycfbridge.c +++ b/Mac/Modules/cf/pycfbridge.c @@ -114,7 +114,7 @@ PyCF_CF2Python_simple(CFTypeRef src) { long l; if (!CFNumberGetValue(src, kCFNumberLongType, &l)) /* XXXX Out of range! */; - return PyInt_FromLong(l); + return PyLong_FromLong(l); } } /* XXXX Should return as CFTypeRef, really... */ @@ -258,8 +258,8 @@ PyCF_Python2CF_simple(PyObject *src, CFTypeRef *dst) { *dst = kCFBooleanFalse; return 1; } - if (PyInt_Check(src)) { - long v = PyInt_AsLong(src); + if (PyLong_Check(src)) { + long v = PyLong_AsLong(src); *dst = CFNumberCreate(NULL, kCFNumberLongType, &v); return 1; } diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c index 4880dee..f872b82 100644 --- a/Mac/Modules/ctl/_Ctlmodule.c +++ b/Mac/Modules/ctl/_Ctlmodule.c @@ -3250,7 +3250,7 @@ static PyObject *CtlObj_TrackControl(ControlObject *_self, PyObject *_args) PyMac_GetPoint, &startPoint, &callback)) return NULL; if (callback && callback != Py_None) { - if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1) + if (PyLong_Check(callback) && PyLong_AS_LONG(callback) == -1) upp = (ControlActionUPP)-1; else { settrackfunc(callback); @@ -3283,7 +3283,7 @@ static PyObject *CtlObj_HandleControlClick(ControlObject *_self, PyObject *_args &callback)) return NULL; if (callback && callback != Py_None) { - if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1) + if (PyLong_Check(callback) && PyLong_AS_LONG(callback) == -1) upp = (ControlActionUPP)-1; else { settrackfunc(callback); diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c index 473a449..1a56325 100644 --- a/Mac/Modules/dlg/_Dlgmodule.c +++ b/Mac/Modules/dlg/_Dlgmodule.c @@ -55,8 +55,8 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog, } else { Dlg_FilterProc_callback = callback; - if (PyInt_Check(res)) { - *itemHit = PyInt_AsLong(res); + if (PyLong_Check(res)) { + *itemHit = PyLong_AsLong(res); rv = 1; } else @@ -150,7 +150,7 @@ PyObject *DlgObj_New(DialogPtr itself) int DlgObj_Convert(PyObject *v, DialogPtr *p_itself) { if (v == Py_None) { *p_itself = NULL; return 1; } - if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v); + if (PyLong_Check(v)) { *p_itself = (DialogPtr)PyLong_AsLong(v); return 1; } if (!DlgObj_Check(v)) { diff --git a/Mac/Modules/gestaltmodule.c b/Mac/Modules/gestaltmodule.c index ddfa94a..387f93c5 100644 --- a/Mac/Modules/gestaltmodule.c +++ b/Mac/Modules/gestaltmodule.c @@ -40,7 +40,7 @@ gestalt_gestalt(PyObject *self, PyObject *args) iErr = Gestalt ( selector, &response ); if (iErr != 0) return PyMac_Error(iErr); - return PyInt_FromLong(response); + return PyLong_FromLong(response); } static struct PyMethodDef gestalt_methods[] = { diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c index 1e4c700..715a4c5 100644 --- a/Mac/Modules/qd/_Qdmodule.c +++ b/Mac/Modules/qd/_Qdmodule.c @@ -1488,14 +1488,14 @@ static PyMethodDef BMObj_methods[] = { static PyObject *BMObj_get_baseAddr(BitMapObject *self, void *closure) { - return PyInt_FromLong((long)self->ob_itself->baseAddr); + return PyLong_FromLong((long)self->ob_itself->baseAddr); } #define BMObj_set_baseAddr NULL static PyObject *BMObj_get_rowBytes(BitMapObject *self, void *closure) { - return PyInt_FromLong((long)self->ob_itself->rowBytes); + return PyLong_FromLong((long)self->ob_itself->rowBytes); } #define BMObj_set_rowBytes NULL diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c index 1cc38ef..ecb5cb3 100644 --- a/Mac/Modules/res/_Resmodule.c +++ b/Mac/Modules/res/_Resmodule.c @@ -556,7 +556,7 @@ static int ResObj_set_data(ResourceObject *self, PyObject *v, void *closure) static PyObject *ResObj_get_size(ResourceObject *self, void *closure) { - return PyInt_FromLong(GetHandleSize(self->ob_itself)); + return PyLong_FromLong(GetHandleSize(self->ob_itself)); } #define ResObj_set_size NULL diff --git a/Mac/Modules/snd/_Sndihooks.c b/Mac/Modules/snd/_Sndihooks.c index 74cad9b..383663a 100644 --- a/Mac/Modules/snd/_Sndihooks.c +++ b/Mac/Modules/snd/_Sndihooks.c @@ -409,7 +409,7 @@ sndih_getSampleSizeAvailable(self, args) if( (rsizes = PyTuple_New(arg.numsizes)) == NULL) return NULL; for( i=0; i<arg.numsizes; i++ ) - PyTuple_SetItem(rsizes, i, PyInt_FromLong((long)fsizes[i])); + PyTuple_SetItem(rsizes, i, PyLong_FromLong((long)fsizes[i])); return rsizes; } diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index ae86468..8a3cb2c 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -74,7 +74,7 @@ int WinObj_Convert(PyObject *v, WindowPtr *p_itself) { if (v == Py_None) { *p_itself = NULL; return 1; } - if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; } + if (PyLong_Check(v)) { *p_itself = (WindowPtr)PyLong_AsLong(v); return 1; } { DialogRef dlg; |