From 23cf1e20a6470588fbc64483031ceeec7614dc56 Mon Sep 17 00:00:00 2001 From: Jeffrey Newman Date: Thu, 6 Apr 2023 10:59:36 -0500 Subject: gh-99202: Fix extension type from documentation for compiling in C++20 mode (#102518) --- Doc/includes/custom3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Doc/includes/custom3.c') diff --git a/Doc/includes/custom3.c b/Doc/includes/custom3.c index 1a68bc4be8..4aeebe0a75 100644 --- a/Doc/includes/custom3.c +++ b/Doc/includes/custom3.c @@ -130,7 +130,7 @@ static PyMethodDef Custom_methods[] = { }; static PyTypeObject CustomType = { - PyVarObject_HEAD_INIT(NULL, 0) + .ob_base = PyVarObject_HEAD_INIT(NULL, 0) .tp_name = "custom3.Custom", .tp_doc = PyDoc_STR("Custom objects"), .tp_basicsize = sizeof(CustomObject), @@ -145,7 +145,7 @@ static PyTypeObject CustomType = { }; static PyModuleDef custommodule = { - PyModuleDef_HEAD_INIT, + .m_base = PyModuleDef_HEAD_INIT, .m_name = "custom3", .m_doc = "Example module that creates an extension type.", .m_size = -1, -- cgit v1.2.1