Commit 1062e706 authored by Jack Jansen's avatar Jack Jansen

Don't initialize tp_type statically, it won't work on Windows. Spotted

by Thomas Heller (patch 459442).
parent 418c3b1e
...@@ -164,7 +164,7 @@ class ObjectDefinition(GeneratorGroup): ...@@ -164,7 +164,7 @@ class ObjectDefinition(GeneratorGroup):
Output() Output()
Output("%sPyTypeObject %s = {", sf, self.typename) Output("%sPyTypeObject %s = {", sf, self.typename)
IndentLevel() IndentLevel()
Output("PyObject_HEAD_INIT(&PyType_Type)") Output("PyObject_HEAD_INIT(NULL)")
Output("0, /*ob_size*/") Output("0, /*ob_size*/")
Output("\"%s\", /*tp_name*/", self.name) Output("\"%s\", /*tp_name*/", self.name)
Output("sizeof(%s), /*tp_basicsize*/", self.objecttype) Output("sizeof(%s), /*tp_basicsize*/", self.objecttype)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment