Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index bd4d17e..3256bf1 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -259,7 +259,7 @@
masklower = PyLong_FromUnsignedLong(0xffffffffU);
if (masklower == NULL)
goto Done;
- thirtytwo = PyInt_FromLong(32L);
+ thirtytwo = PyLong_FromLong(32L);
if (thirtytwo == NULL)
goto Done;
while ((err=PyObject_IsTrue(n))) {
@@ -319,12 +319,12 @@
if (state == NULL)
return NULL;
for (i=0; i<N ; i++) {
- element = PyInt_FromLong((long)(self->state[i]));
+ element = PyLong_FromLong((long)(self->state[i]));
if (element == NULL)
goto Fail;
PyTuple_SET_ITEM(state, i, element);
}
- element = PyInt_FromLong((long)(self->index));
+ element = PyLong_FromLong((long)(self->index));
if (element == NULL)
goto Fail;
PyTuple_SET_ITEM(state, i, element);
@@ -353,13 +353,13 @@
}
for (i=0; i<N ; i++) {
- element = PyInt_AsLong(PyTuple_GET_ITEM(state, i));
+ element = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
if (element == -1 && PyErr_Occurred())
return NULL;
self->state[i] = (unsigned long)element;
}
- element = PyInt_AsLong(PyTuple_GET_ITEM(state, i));
+ element = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
if (element == -1 && PyErr_Occurred())
return NULL;
self->index = (int)element;
@@ -410,14 +410,14 @@
mt = self->state;
for (i = N-1; i > 1; i--) {
- iobj = PyInt_FromLong(i);
+ iobj = PyLong_FromLong(i);
if (iobj == NULL)
return NULL;
remobj = PyNumber_Remainder(n, iobj);
Py_DECREF(iobj);
if (remobj == NULL)
return NULL;
- j = PyInt_AsLong(remobj);
+ j = PyLong_AsLong(remobj);
Py_DECREF(remobj);
if (j == -1L && PyErr_Occurred())
return NULL;