]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40170: PyObject_GET_WEAKREFS_LISTPTR() becomes a function (GH-19377)
authorVictor Stinner <vstinner@python.org>
Mon, 6 Apr 2020 12:07:02 +0000 (14:07 +0200)
committerGitHub <noreply@github.com>
Mon, 6 Apr 2020 12:07:02 +0000 (14:07 +0200)
commit38aefc585f60a77d66f4fbe5a37594a488b53474
tree142fb1765e421b36ee746a6a5f53b0d52161b2c2
parent08050e959e6c40839cd2c9e5f6a4fd1513e3d605
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.
Include/cpython/objimpl.h
Include/internal/pycore_object.h
Misc/NEWS.d/next/C API/2020-04-05-00-10-45.bpo-40170.6nFYbY.rst [new file with mode: 0644]
Modules/_weakref.c
Modules/gcmodule.c
Objects/object.c
Objects/typeobject.c
Objects/weakrefobject.c