Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1062e70

Browse files
committed
Don't initialize tp_type statically, it won't work on Windows. Spotted
by Thomas Heller (patch 459442).
1 parent 418c3b1 commit 1062e70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tools/bgen/bgen/bgenObjectDefinition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def outputTypeObject(self):
164164
Output()
165165
Output("%sPyTypeObject %s = {", sf, self.typename)
166166
IndentLevel()
167-
Output("PyObject_HEAD_INIT(&PyType_Type)")
167+
Output("PyObject_HEAD_INIT(NULL)")
168168
Output("0, /*ob_size*/")
169169
Output("\"%s\", /*tp_name*/", self.name)
170170
Output("sizeof(%s), /*tp_basicsize*/", self.objecttype)

0 commit comments

Comments
 (0)