diff options
author | Jeffrey Newman <jeff@newman.me> | 2023-04-06 10:59:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 17:59:36 +0200 |
commit | 23cf1e20a6470588fbc64483031ceeec7614dc56 (patch) | |
tree | 1a687dbdac35b44444eabe31e498a6ad69d683a5 /Doc/includes/custom3.c | |
parent | 52bc2e7b9d451821513a580a9b73c20cfdcf2b21 (diff) | |
download | cpython-git-23cf1e20a6470588fbc64483031ceeec7614dc56.tar.gz |
gh-99202: Fix extension type from documentation for compiling in C++20 mode (#102518)
Diffstat (limited to 'Doc/includes/custom3.c')
-rw-r--r-- | Doc/includes/custom3.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |