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

Skip to content

Commit 77e8ad4

Browse files
committed
Always use self->ob_type->tp_free when freeing an object.
1 parent 6810f92 commit 77e8ad4

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
@@ -137,7 +137,7 @@ def outputDealloc(self):
137137
if self.basetype:
138138
Output("%s.tp_dealloc(self)", self.basetype)
139139
else:
140-
Output("PyObject_Del(self);")
140+
Output("self->ob_type->tp_free((PyObject *)self);")
141141
OutRbrace()
142142

143143
def outputCleanupStructMembers(self):

0 commit comments

Comments
 (0)