summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-06 12:40:08 (GMT)
committerGitHub <noreply@github.com>2022-05-06 12:40:08 (GMT)
commitc33d67c4506d96a02c6ace382c38e2fb7a614843 (patch)
treec9082448838b57e1030578c22ee6a811efa5e20e
parent5fbaf80057fb9f1583b7bd1f840e7d2ba0cf27cb (diff)
downloadcpython-c33d67c4506d96a02c6ace382c38e2fb7a614843.zip
cpython-c33d67c4506d96a02c6ace382c38e2fb7a614843.tar.gz
cpython-c33d67c4506d96a02c6ace382c38e2fb7a614843.tar.bz2
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.
-rw-r--r--Include/object.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h
index a0dba69..fac8892 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