Commits

Benjamin Peterson  committed 84590a6

add some casts and fix the build from 64311

  • Participants
  • Parent commits 609b09a

Comments (0)

Files changed (1)

File Objects/weakrefobject.c

             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);
             }
             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);