diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-06-16 20:47:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-06-16 20:47:12 (GMT) |
commit | a38d156bf21e01a8d2f6603d58675e65b5149008 (patch) | |
tree | b15ec5d5abe4d7dec2129b676abf0583ad59010d | |
parent | 920fca3922b94084ac23520c2abbf72d0e1e68fc (diff) | |
download | cpython-a38d156bf21e01a8d2f6603d58675e65b5149008.zip cpython-a38d156bf21e01a8d2f6603d58675e65b5149008.tar.gz cpython-a38d156bf21e01a8d2f6603d58675e65b5149008.tar.bz2 |
add some casts and fix the build from 64311
-rw-r--r-- | Objects/weakrefobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 302cdc9..6ceed73 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -884,7 +884,7 @@ PyObject_ClearWeakRefs(PyObject *object) current->wr_callback = NULL; clear_weakref(current); if (callback != NULL) { - if (current->ob_refcnt > 0) + if (((PyObject *)current)->ob_refcnt > 0) handle_callback(current, callback); Py_DECREF(callback); } @@ -903,7 +903,7 @@ PyObject_ClearWeakRefs(PyObject *object) for (i = 0; i < count; ++i) { PyWeakReference *next = current->wr_next; - if (current->ob_refcnt > 0) + if (((PyObject *)current)->ob_refcnt > 0) { Py_INCREF(current); PyTuple_SET_ITEM(tuple, i * 2, (PyObject *) current); |