summaryrefslogtreecommitdiffstats
path: root/Objects/weakrefobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r--Objects/weakrefobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 9f492e4..9227aa6 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -833,7 +833,8 @@ PyWeakref_NewProxy(PyObject *ob, PyObject *callback)
to avoid violating the invariants of the list
of weakrefs for ob. */
Py_DECREF(result);
- Py_INCREF(result = proxy);
+ result = proxy;
+ Py_INCREF(result);
goto skip_insert;
}
prev = ref;