Skip to content

Commit c33d67c

Browse files
authored
gh-91321: Fix _PyObject_EXTRA_INIT for C++ (#92396)
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.
1 parent 5fbaf80 commit c33d67c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/object.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ whose size is determined when the object is allocated.
6666
PyObject *_ob_next; \
6767
PyObject *_ob_prev;
6868

69-
#define _PyObject_EXTRA_INIT 0, 0,
69+
#define _PyObject_EXTRA_INIT _Py_NULL, _Py_NULL,
7070

7171
#else
7272
# define _PyObject_HEAD_EXTRA

0 commit comments

Comments
 (0)