summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-03-07 12:08:51 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-03-07 12:08:51 +0000
commit6f237c65900b6b00dc141265f0fa1f8b4e909142 (patch)
treef11cf9bfcfc622aea3f6dd56d7aa047fa774e271 /Python/sysmodule.c
parent61c2602414cadf72b4e1b58b5dc42ff9fe477369 (diff)
downloadcpython-6f237c65900b6b00dc141265f0fa1f8b4e909142.tar.gz
Change int to Py_ssize_t in several places.
Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index a33ac26c61..6eadd06d9c 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -597,7 +597,7 @@ sys_mdebug(PyObject *self, PyObject *args)
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