From df22eec4215e515e36e387b9022fb8ca95fd39af Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 13 Jun 2022 20:09:40 +0200 Subject: gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766) Header files in the Include/cpython/ are only included if the Py_LIMITED_API macro is not defined. --- Include/cpython/weakrefobject.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Include/cpython/weakrefobject.h') diff --git a/Include/cpython/weakrefobject.h b/Include/cpython/weakrefobject.h index 26b364f41d..fd79fdc2dc 100644 --- a/Include/cpython/weakrefobject.h +++ b/Include/cpython/weakrefobject.h @@ -53,6 +53,4 @@ static inline PyObject* PyWeakref_GET_OBJECT(PyObject *ref_obj) { } return Py_None; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyWeakref_GET_OBJECT(ref) PyWeakref_GET_OBJECT(_PyObject_CAST(ref)) -#endif +#define PyWeakref_GET_OBJECT(ref) PyWeakref_GET_OBJECT(_PyObject_CAST(ref)) -- cgit v1.2.1