mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Change int to Py_ssize_t in several places.
Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
This commit is contained in:
parent
8eb8a829c1
commit
725507b52e
11 changed files with 57 additions and 32 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue