]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-89653: PEP 670: Convert PyWeakref_GET_OBJECT() to function (#91785)
authorVictor Stinner <vstinner@python.org>
Thu, 21 Apr 2022 14:01:47 +0000 (16:01 +0200)
committerGitHub <noreply@github.com>
Thu, 21 Apr 2022 14:01:47 +0000 (16:01 +0200)
commit1a2b282f201073d5153e737568c833af6f1b349e
tree81040c44144273aa43c8ad8e5420871b40f6f871
parentf2b4e458b3327130e46edb4efe8e1847de09efc5
gh-89653: PEP 670: Convert PyWeakref_GET_OBJECT() to function (#91785)

Convert the PyWeakref_GET_OBJECT() macro to a static inline function.
Add an assertion to check the argument with PyWeakref_Check(). Add a
macro converting the argument to PyObject* to prevent emitting new
compiler warning.
Include/cpython/weakrefobject.h