From: Benjamin Peterson Date: Mon, 16 Jun 2008 20:47:12 +0000 (+0000) Subject: add some casts and fix the build from 64311 X-Git-Tag: v3.0b1~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a38d156bf21e01a8d2f6603d58675e65b5149008;p=python add some casts and fix the build from 64311 --- diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 302cdc9edf..6ceed73de9 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);