Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
diff --git a/PC/_subprocess.c b/PC/_subprocess.c
index e711e13..fec7b22 100644
--- a/PC/_subprocess.c
+++ b/PC/_subprocess.c
@@ -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);