diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-02 06:14:22 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-08-02 06:14:22 (GMT) |
commit | c5e060dee65a03ca2401487315d6c45dead09fe1 (patch) | |
tree | 6e511f92022cb278324a4a2fb2b581988eed3939 /Modules | |
parent | 5fb9c20f2a6c76279e16420255758855d6d98432 (diff) | |
download | cpython-c5e060dee65a03ca2401487315d6c45dead09fe1.zip cpython-c5e060dee65a03ca2401487315d6c45dead09fe1.tar.gz cpython-c5e060dee65a03ca2401487315d6c45dead09fe1.tar.bz2 |
_PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_weakref.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c index 2dfdc14..1712f12 100644 --- a/Modules/_weakref.c +++ b/Modules/_weakref.c @@ -17,7 +17,7 @@ weakref_getweakrefcount(PyObject *self, PyObject *object) if (PyType_SUPPORTS_WEAKREFS(object->ob_type)) { PyWeakReference **list = GET_WEAKREFS_LISTPTR(object); - result = PyInt_FromLong(_PyWeakref_GetWeakrefCount(*list)); + result = PyInt_FromSsize_t(_PyWeakref_GetWeakrefCount(*list)); } else result = PyInt_FromLong(0); @@ -37,12 +37,12 @@ weakref_getweakrefs(PyObject *self, PyObject *object) if (PyType_SUPPORTS_WEAKREFS(object->ob_type)) { PyWeakReference **list = GET_WEAKREFS_LISTPTR(object); - long count = _PyWeakref_GetWeakrefCount(*list); + Py_ssize_t count = _PyWeakref_GetWeakrefCount(*list); result = PyList_New(count); if (result != NULL) { PyWeakReference *current = *list; - long i; + Py_ssize_t i; for (i = 0; i < count; ++i) { PyList_SET_ITEM(result, i, (PyObject *) current); Py_INCREF(current); |