diff Modules/itertoolsmodule.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 3e5edf19d5f0
children 86a2679dca46
line wrap: on
line diff
--- a/Modules/itertoolsmodule.c	Sun Dec 02 09:40:06 2007 +0000
+++ b/Modules/itertoolsmodule.c	Sun Dec 02 14:31:20 2007 +0000
@@ -1122,7 +1122,7 @@
 	numargs = PyTuple_Size(args);
 	if (numargs == 2) {
 		if (a1 != Py_None) {
-			stop = PyInt_AsSsize_t(a1);
+			stop = PyLong_AsSsize_t(a1);
 			if (stop == -1) {
 				if (PyErr_Occurred())
 					PyErr_Clear();
@@ -1133,11 +1133,11 @@
 		}
 	} else {
 		if (a1 != Py_None)
-			start = PyInt_AsSsize_t(a1);
+			start = PyLong_AsSsize_t(a1);
 		if (start == -1 && PyErr_Occurred())
 			PyErr_Clear();
 		if (a2 != Py_None) {
-			stop = PyInt_AsSsize_t(a2);
+			stop = PyLong_AsSsize_t(a2);
 			if (stop == -1) {
 				if (PyErr_Occurred())
 					PyErr_Clear();
@@ -1155,7 +1155,7 @@
 
 	if (a3 != NULL) {
 		if (a3 != Py_None)
-			step = PyInt_AsSsize_t(a3);
+			step = PyLong_AsSsize_t(a3);
 		if (step == -1 && PyErr_Occurred())
 			PyErr_Clear();
 	}
@@ -2052,7 +2052,7 @@
 		return NULL;
 
 	if (cnt_arg != NULL) {
-		cnt = PyInt_AsSsize_t(cnt_arg);
+		cnt = PyLong_AsSsize_t(cnt_arg);
 		if (cnt == -1 && PyErr_Occurred()) {
 			PyErr_Clear();
 			if (!PyLong_Check(cnt_arg)) {
@@ -2092,12 +2092,12 @@
 	PyObject *stepped_up;
 
 	if (lz->long_cnt == NULL) {
-		lz->long_cnt = PyInt_FromSsize_t(PY_SSIZE_T_MAX);
+		lz->long_cnt = PyLong_FromSsize_t(PY_SSIZE_T_MAX);
 		if (lz->long_cnt == NULL)
 			return NULL;
 	}
 	if (one == NULL) {
-		one = PyInt_FromLong(1);
+		one = PyLong_FromLong(1);
 		if (one == NULL)
 			return NULL;
 	}
@@ -2115,7 +2115,7 @@
 {
         if (lz->cnt == PY_SSIZE_T_MAX)
 		return count_nextlong(lz);
-	return PyInt_FromSsize_t(lz->cnt++);
+	return PyLong_FromSsize_t(lz->cnt++);
 }
 
 static PyObject *
@@ -2440,7 +2440,7 @@
                 PyErr_SetString(PyExc_TypeError, "len() of unsized object");
 		return NULL;
 	}
-        return PyInt_FromSize_t(ro->cnt);
+        return PyLong_FromSize_t(ro->cnt);
 }
 
 PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it)).");