Commit a38d156b authored by Benjamin Peterson's avatar Benjamin Peterson

add some casts and fix the build from 64311

parent 920fca39
...@@ -884,7 +884,7 @@ PyObject_ClearWeakRefs(PyObject *object) ...@@ -884,7 +884,7 @@ PyObject_ClearWeakRefs(PyObject *object)
current->wr_callback = NULL; current->wr_callback = NULL;
clear_weakref(current); clear_weakref(current);
if (callback != NULL) { if (callback != NULL) {
if (current->ob_refcnt > 0) if (((PyObject *)current)->ob_refcnt > 0)
handle_callback(current, callback); handle_callback(current, callback);
Py_DECREF(callback); Py_DECREF(callback);
} }
...@@ -903,7 +903,7 @@ PyObject_ClearWeakRefs(PyObject *object) ...@@ -903,7 +903,7 @@ PyObject_ClearWeakRefs(PyObject *object)
for (i = 0; i < count; ++i) { for (i = 0; i < count; ++i) {
PyWeakReference *next = current->wr_next; PyWeakReference *next = current->wr_next;
if (current->ob_refcnt > 0) if (((PyObject *)current)->ob_refcnt > 0)
{ {
Py_INCREF(current); Py_INCREF(current);
PyTuple_SET_ITEM(tuple, i * 2, (PyObject *) current); PyTuple_SET_ITEM(tuple, i * 2, (PyObject *) current);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment