[Zope-Checkins] CVS: StandaloneZODB/ZODB - TimeStamp.c:1.15 cPersistence.c:1.50 cPickleCache.c:1.41 coptimizations.c:1.17
Jeremy Hylton
jeremy@zope.com
Fri, 8 Mar 2002 13:36:16 -0500
Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv28012
Modified Files:
TimeStamp.c cPersistence.c cPickleCache.c coptimizations.c
Log Message:
(Possibly) correct use of Python memory APIs.
Fix SF bug #516768 reported by Dave Wallace.
Replace use of PyMem_DEL() with PyObject_Del() on object dealloc
functions. The use of PyMem_DEL() is incorrect for object
deallocation, because it only ever calls the low-level free(). If a
custom allocator like pymalloc is used, it needs to be called to free
the memory.
=== StandaloneZODB/ZODB/TimeStamp.c 1.14 => 1.15 ===
Py_DECREF(self->ob_type);
#endif
- PyMem_DEL(self);
+ PyObject_DEL(self);
}
static PyObject *
=== StandaloneZODB/ZODB/cPersistence.c 1.49 => 1.50 ===
Py_XDECREF(self->oid);
Py_DECREF(self->ob_type);
- PyMem_DEL(self);
+ PyObject_DEL(self);
}
static PyObject *
=== StandaloneZODB/ZODB/cPickleCache.c 1.40 => 1.41 ===
Py_XDECREF(self->jar);
Py_XDECREF(self->setklassstate);
- PyMem_DEL(self);
+ PyObject_DEL(self);
}
static PyObject *
=== StandaloneZODB/ZODB/coptimizations.c 1.16 => 1.17 ===
Py_DECREF(self->stackup);
Py_XDECREF(self->new_oid);
- PyMem_DEL(self);
+ PyObject_DEL(self);
}
static PyObject *