summaryrefslogtreecommitdiffstats
path: root/Modules/_weakref.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_weakref.c')
-rw-r--r--Modules/_weakref.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index 387b8fa..21ff0e2 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -1,5 +1,6 @@
#include "Python.h"
-#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR
+#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR
+#include "pycore_weakref.h" // _PyWeakref_IS_DEAD()
#define GET_WEAKREFS_LISTPTR(o) \
@@ -43,7 +44,7 @@ is_dead_weakref(PyObject *value)
PyErr_SetString(PyExc_TypeError, "not a weakref");
return -1;
}
- return PyWeakref_GET_OBJECT(value) == Py_None;
+ return _PyWeakref_IS_DEAD(value);
}
/*[clinic input]