Skip to content

Commit b13e464

Browse files
committed
Workaround for C++ compilers that don't support designated initializers
We have buildbots like that...
1 parent 498e8bb commit b13e464

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Lib/test/_testcppext.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ PyType_Slot VirtualPyObject_Slots[] = {
158158
};
159159

160160
PyType_Spec VirtualPyObject_Spec = {
161-
.name = STR(NAME) ".VirtualPyObject",
162-
.basicsize = sizeof(VirtualPyObject),
163-
.flags = Py_TPFLAGS_DEFAULT,
164-
.slots = VirtualPyObject_Slots,
161+
/* .name */ STR(NAME) ".VirtualPyObject",
162+
/* .basicsize */ sizeof(VirtualPyObject),
163+
/* .itemsize */ 0,
164+
/* .flags */ Py_TPFLAGS_DEFAULT,
165+
/* .slots */ VirtualPyObject_Slots,
165166
};
166167

167168
VirtualPyObject::VirtualPyObject() {

0 commit comments

Comments
 (0)