Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 36866:9eb24f92a784 legacy-trunk
Change int to Py_ssize_t in several places.
Add (int) casts to silence compiler warnings.
Raise Python exceptions for overflows.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 07 Mar 2006 12:08:51 +0000 |
| parents | 3a3aed49b245 |
| children | 91a9e2e31e93 |
line wrap: on
line diff
--- a/Python/sysmodule.c Tue Mar 07 11:58:50 2006 +0000 +++ b/Python/sysmodule.c Tue Mar 07 12:08:51 2006 +0000 @@ -597,7 +597,7 @@ static PyObject * sys_getrefcount(PyObject *self, PyObject *arg) { - return PyInt_FromLong(arg->ob_refcnt); + return PyInt_FromSsize_t(arg->ob_refcnt); } #ifdef Py_REF_DEBUG
