summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_weakref.c3
-rw-r--r--Modules/gcmodule.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index cd7c4c159a..e33cba2a3d 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -1,8 +1,9 @@
#include "Python.h"
+#include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR
#define GET_WEAKREFS_LISTPTR(o) \
- ((PyWeakReference **) PyObject_GET_WEAKREFS_LISTPTR(o))
+ ((PyWeakReference **) _PyObject_GET_WEAKREFS_LISTPTR(o))
/*[clinic input]
module _weakref
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index cf164c17d7..1bc41fb83d 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -788,7 +788,7 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
/* It supports weakrefs. Does it have any? */
wrlist = (PyWeakReference **)
- PyObject_GET_WEAKREFS_LISTPTR(op);
+ _PyObject_GET_WEAKREFS_LISTPTR(op);
/* `op` may have some weakrefs. March over the list, clear
* all the weakrefs, and move the weakrefs with callbacks