[Python-checkins] python/dist/src/Tools/bgen/bgen bgenObjectDefinition.py, 1.25, 1.26

jackjansen at users.sourceforge.net jackjansen at users.sourceforge.net
Thu Jul 15 23:24:10 CEST 2004


Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27630/Tools/bgen/bgen

Modified Files:
	bgenObjectDefinition.py 
Log Message:
Call the correct tp_dealloc.


Index: bgenObjectDefinition.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/bgenObjectDefinition.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** bgenObjectDefinition.py	19 Jan 2003 21:53:56 -0000	1.25
--- bgenObjectDefinition.py	15 Jul 2004 21:24:07 -0000	1.26
***************
*** 136,140 ****
          self.outputCleanupStructMembers()
          if self.basetype:
!             Output("%s.tp_dealloc(self)", self.basetype)
          elif hasattr(self, 'output_tp_free'):
              # This is a new-style object with tp_free slot
--- 136,140 ----
          self.outputCleanupStructMembers()
          if self.basetype:
!             Output("self->ob_type->tp_base->tp_dealloc((PyObject *)self);")
          elif hasattr(self, 'output_tp_free'):
              # This is a new-style object with tp_free slot
***************
*** 211,215 ****
          Output("""%s.ob_type = &PyType_Type;""", self.typename)
          if self.basetype:
!             Output("%s.tp_base = %s;", self.typename, self.basetype)
          Output("if (PyType_Ready(&%s) < 0) return;", self.typename)
          Output("""Py_INCREF(&%s);""", self.typename)
--- 211,215 ----
          Output("""%s.ob_type = &PyType_Type;""", self.typename)
          if self.basetype:
!             Output("%s.tp_base = &%s;", self.typename, self.basetype)
          Output("if (PyType_Ready(&%s) < 0) return;", self.typename)
          Output("""Py_INCREF(&%s);""", self.typename)



More information about the Python-checkins mailing list