From: Jack Jansen Date: Wed, 14 Nov 2001 15:48:13 +0000 (+0000) Subject: Don't initialize tp_type statically, it won't work on Windows. Spotted X-Git-Tag: v2.2.1c1~771 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1062e706e5778d17b590414529c9e0191e24bea0;p=python Don't initialize tp_type statically, it won't work on Windows. Spotted by Thomas Heller (patch 459442). --- diff --git a/Tools/bgen/bgen/bgenObjectDefinition.py b/Tools/bgen/bgen/bgenObjectDefinition.py index 01585bb8b3..1d5cb22795 100644 --- a/Tools/bgen/bgen/bgenObjectDefinition.py +++ b/Tools/bgen/bgen/bgenObjectDefinition.py @@ -164,7 +164,7 @@ class ObjectDefinition(GeneratorGroup): Output() Output("%sPyTypeObject %s = {", sf, self.typename) IndentLevel() - Output("PyObject_HEAD_INIT(&PyType_Type)") + Output("PyObject_HEAD_INIT(NULL)") Output("0, /*ob_size*/") Output("\"%s\", /*tp_name*/", self.name) Output("sizeof(%s), /*tp_basicsize*/", self.objecttype)