Mercurial > cpython-lru_cache-weakref
diff Python/compile.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 | 0d462d789b18 |
| children | 4dc01402d78a |
line wrap: on
line diff
--- a/Python/compile.c Sun Dec 02 09:40:06 2007 +0000 +++ b/Python/compile.c Sun Dec 02 14:31:20 2007 +0000 @@ -335,7 +335,7 @@ n = PyList_Size(list); for (i = 0; i < n; i++) { - v = PyInt_FromLong(i); + v = PyLong_FromLong(i); if (!v) { Py_DECREF(dict); return NULL; @@ -375,12 +375,12 @@ while (PyDict_Next(src, &pos, &k, &v)) { /* XXX this should probably be a macro in symtable.h */ long vi; - assert(PyInt_Check(v)); - vi = PyInt_AS_LONG(v); + assert(PyLong_Check(v)); + vi = PyLong_AS_LONG(v); scope = (vi >> SCOPE_OFFSET) & SCOPE_MASK; if (scope == scope_type || vi & flag) { - PyObject *tuple, *item = PyInt_FromLong(i); + PyObject *tuple, *item = PyLong_FromLong(i); if (item == NULL) { Py_DECREF(dest); return NULL; @@ -907,7 +907,7 @@ if (PyErr_Occurred()) return -1; arg = PyDict_Size(dict); - v = PyInt_FromLong(arg); + v = PyLong_FromLong(arg); if (!v) { Py_DECREF(t); return -1; @@ -920,7 +920,7 @@ Py_DECREF(v); } else - arg = PyInt_AsLong(v); + arg = PyLong_AsLong(v); Py_DECREF(t); return arg; } @@ -1208,7 +1208,7 @@ Py_DECREF(k); if (v == NULL) return -1; - return PyInt_AS_LONG(v); + return PyLong_AS_LONG(v); } static int @@ -2065,7 +2065,7 @@ int r; PyObject *level; - level = PyInt_FromLong(0); + level = PyLong_FromLong(0); if (level == NULL) return 0; @@ -2108,7 +2108,7 @@ if (!names) return 0; - level = PyInt_FromLong(s->v.ImportFrom.level); + level = PyLong_FromLong(s->v.ImportFrom.level); if (!level) { Py_DECREF(names); return 0; @@ -3916,7 +3916,7 @@ if (tuple == NULL) return NULL; while (PyDict_Next(dict, &pos, &k, &v)) { - i = PyInt_AS_LONG(v); + i = PyLong_AS_LONG(v); k = PyTuple_GET_ITEM(k, 0); Py_INCREF(k); assert((i - offset) < size);
