We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0686a2b commit b060e41Copy full SHA for b060e41
pythonBuffer.h
@@ -526,7 +526,12 @@ namespace classdesc
526
{nullptr, nullptr, 0, nullptr}
527
};
528
529
- struct CppWrapperType: public PyTypeObject
+ struct InitialisedPyTypeObject: public PyTypeObject
530
+ {
531
+ InitialisedPyTypeObject() {memset(this,0,sizeof(PyTypeObject));}
532
+ };
533
+
534
+ struct CppWrapperType: public InitialisedPyTypeObject
535
{
536
// container commands that take a key as as an argument
537
static bool containerSpecialCommand(const std::string& command)
@@ -645,7 +650,6 @@ namespace classdesc
645
650
646
651
CppWrapperType()
647
652
648
- memset(this,0,sizeof(PyTypeObject));
649
653
Py_INCREF(this);
654
tp_name="CppWrapperType";
655
tp_methods=cppWrapperMethods;
0 commit comments