[Python-checkins] gh-91321: Fix _PyObject_EXTRA_INIT for C++ (#92396)
pablogsal
webhook-mailer at python.org
Fri May 6 08:40:21 EDT 2022
https://github.com/python/cpython/commit/c33d67c4506d96a02c6ace382c38e2fb7a614843
commit: c33d67c4506d96a02c6ace382c38e2fb7a614843
branch: main
author: Victor Stinner <vstinner at python.org>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-05-06T13:40:08+01:00
summary:
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.
files:
M Include/object.h
diff --git a/Include/object.h b/Include/object.h
index a0dba697569c4..fac8892f65552 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
More information about the Python-checkins
mailing list