summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/bgen/bgen/bgenObjectDefinition.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/bgen/bgen/bgenObjectDefinition.py b/Tools/bgen/bgen/bgenObjectDefinition.py
index 510b9b8..fd60d61 100644
--- a/Tools/bgen/bgen/bgenObjectDefinition.py
+++ b/Tools/bgen/bgen/bgenObjectDefinition.py
@@ -137,7 +137,7 @@ class ObjectDefinition(GeneratorGroup):
if self.basetype:
Output("%s.tp_dealloc(self)", self.basetype)
else:
- Output("PyObject_Del(self);")
+ Output("self->ob_type->tp_free((PyObject *)self);")
OutRbrace()
def outputCleanupStructMembers(self):