aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-06 14:07:02 +0200
committerGitHub <noreply@github.com>2020-04-06 14:07:02 +0200
commit38aefc585f60a77d66f4fbe5a37594a488b53474 (patch)
tree142fb1765e421b36ee746a6a5f53b0d52161b2c2 /Modules/gcmodule.c
parentbpo-40147: Fix a compiler warning on Windows in Python/compile.c (GH-19389) (diff)
downloadcpython-38aefc585f60a77d66f4fbe5a37594a488b53474.tar.gz
cpython-38aefc585f60a77d66f4fbe5a37594a488b53474.tar.bz2
cpython-38aefc585f60a77d66f4fbe5a37594a488b53474.zip
bpo-40170: PyObject_GET_WEAKREFS_LISTPTR() becomes a function (GH-19377)
Convert the PyObject_GET_WEAKREFS_LISTPTR() macro to a function to hide implementation details: the macro accessed directly to the PyTypeObject.tp_weaklistoffset member. Add _PyObject_GET_WEAKREFS_LISTPTR() static inline function to the internal C API.
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r--Modules/gcmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index cf164c17d7b..1bc41fb83d8 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