From c6dee8e6cc10161579a3fa9cca4c2be44eaa53eb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 6 May 2022 14:14:03 +0200 Subject: [PATCH] gh-91321: Fix _PyObject_EXTRA_INIT for C++ In C++, the _PyObject_EXTRA_INIT macro now uses nullptr, rather than 0, to initialize the _ob_next and _ob_prev members of the PyObject structure. Fix test_cppext failure when Python is built with ./configure --with-trace-refs. --- Include/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/object.h b/Include/object.h index a0dba697569c43..fac8892f655527 100644 --- a/Include/object.h +++ b/Include/object.h @@ -66,7 +66,7 @@ whose size is determined when the object is allocated. PyObject *_ob_next; \ PyObject *_ob_prev; -#define _PyObject_EXTRA_INIT 0, 0, +#define _PyObject_EXTRA_INIT _Py_NULL, _Py_NULL, #else # define _PyObject_HEAD_EXTRA