Silence GCC warning when asserts are turned off.
This commit is contained in:
parent
c714d45bf5
commit
0bba722fff
@ -533,11 +533,10 @@ release_weakrefs(PyGC_Head *wr_callbacks, PyGC_Head *old)
|
|||||||
while (! gc_list_is_empty(wr_callbacks)) {
|
while (! gc_list_is_empty(wr_callbacks)) {
|
||||||
PyGC_Head *gc = wr_callbacks->gc.gc_next;
|
PyGC_Head *gc = wr_callbacks->gc.gc_next;
|
||||||
PyObject *op = FROM_GC(gc);
|
PyObject *op = FROM_GC(gc);
|
||||||
PyWeakReference *wr = (PyWeakReference *)op;
|
|
||||||
|
|
||||||
assert(IS_REACHABLE(op));
|
assert(IS_REACHABLE(op));
|
||||||
assert(PyWeakref_Check(op));
|
assert(PyWeakref_Check(op));
|
||||||
assert(wr->wr_callback != NULL);
|
assert(((PyWeakReference *)op)->wr_callback != NULL);
|
||||||
Py_DECREF(op);
|
Py_DECREF(op);
|
||||||
if (wr_callbacks->gc.gc_next == gc) {
|
if (wr_callbacks->gc.gc_next == gc) {
|
||||||
/* object is still alive -- move it */
|
/* object is still alive -- move it */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user