[Python-3000-checkins] r64316 - python/branches/py3k/Objects/weakrefobject.c

benjamin.peterson python-3000-checkins at python.org
Mon Jun 16 22:47:12 CEST 2008


Author: benjamin.peterson
Date: Mon Jun 16 22:47:12 2008
New Revision: 64316

Log:
add some casts and fix the build from 64311

Modified:
   python/branches/py3k/Objects/weakrefobject.c

Modified: python/branches/py3k/Objects/weakrefobject.c
==============================================================================
--- python/branches/py3k/Objects/weakrefobject.c	(original)
+++ python/branches/py3k/Objects/weakrefobject.c	Mon Jun 16 22:47:12 2008
@@ -884,7 +884,7 @@
             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 @@
             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);


More information about the Python-3000-checkins mailing list