chiark / gitweb /
cdbmodule.c: Fix deallocation.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 10 Oct 2009 12:15:39 +0000 (13:15 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 10 Oct 2009 12:15:39 +0000 (13:15 +0100)
Use PyObject_Del rather than PyMem_DEL, because the former doesn't lead
to a ghastly crash.

src/cdbmodule.c

index bdf10dc..bfd7f00 100644 (file)
@@ -655,7 +655,7 @@ cdbo_dealloc(CdbObject *self) {  /* del(cdb_o) */
 
   cdb_free(&self->c);
 
-  PyMem_DEL(self);
+  PyObject_Del((PyObject *)self);
 }
 
 static PyObject *
@@ -823,7 +823,7 @@ cdbmake_dealloc(cdbmakeobject *self) {
     Py_DECREF(self->fntmp);
   }
 
-  PyMem_DEL(self);
+  PyObject_Del((PyObject *)self);
 }
 
 static PyObject *