Mercurial > cpython-lru_cache-weakref
diff PC/_subprocess.c @ 44099:f324631462a2
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Sun, 02 Dec 2007 14:31:20 +0000 |
| parents | b9226cad9dfd |
| children | 86a2679dca46 |
line wrap: on
line diff
--- a/PC/_subprocess.c Sun Dec 02 09:40:06 2007 +0000 +++ b/PC/_subprocess.c Sun Dec 02 14:31:20 2007 +0000 @@ -79,7 +79,7 @@ self->handle = NULL; /* note: return the current handle, as an integer */ - return PyInt_FromLong((long) handle); + return PyLong_FromLong((long) handle); } static PyObject* @@ -119,7 +119,7 @@ static PyObject* sp_handle_as_int(sp_handle_object* self) { - return PyInt_FromLong((long) self->handle); + return PyLong_FromLong((long) self->handle); } static PyNumberMethods sp_handle_as_number; @@ -164,7 +164,7 @@ } /* note: returns integer, not handle object */ - return PyInt_FromLong((long) handle); + return PyLong_FromLong((long) handle); } static PyObject * @@ -253,7 +253,7 @@ PyErr_Clear(); /* FIXME: propagate error? */ return 0; } - ret = (int) PyInt_AsLong(value); + ret = (int) PyLong_AsLong(value); Py_DECREF(value); return ret; } @@ -462,7 +462,7 @@ if (! result) return PyErr_SetFromWindowsErr(GetLastError()); - return PyInt_FromLong(exit_code); + return PyLong_FromLong(exit_code); } static PyObject * @@ -484,7 +484,7 @@ if (result == WAIT_FAILED) return PyErr_SetFromWindowsErr(GetLastError()); - return PyInt_FromLong((int) result); + return PyLong_FromLong((int) result); } static PyObject * @@ -493,7 +493,7 @@ if (! PyArg_ParseTuple(args, ":GetVersion")) return NULL; - return PyInt_FromLong((int) GetVersion()); + return PyLong_FromLong((int) GetVersion()); } static PyObject * @@ -534,7 +534,7 @@ static void defint(PyObject* d, const char* name, int value) { - PyObject* v = PyInt_FromLong((long) value); + PyObject* v = PyLong_FromLong((long) value); if (v) { PyDict_SetItemString(d, (char*) name, v); Py_DECREF(v);
