static void hdr_dealloc(hdrObject * s)
{
if (s->h) headerFree(s->h);
- PyObject_Del(s);
+ s->ob_type->tp_free((PyObject *)s);
}
int tagNumFromPyObject (PyObject *item, rpmTag *tagp)
static void
rpmds_dealloc(rpmdsObject * s)
{
- if (s) {
- s->ds = rpmdsFree(s->ds);
- PyObject_Del(s);
- }
+ s->ds = rpmdsFree(s->ds);
+ s->ob_type->tp_free((PyObject *)s);
}
static int
static void
rpmfi_dealloc(rpmfiObject * s)
{
- if (s) {
- s->fi = rpmfiFree(s->fi);
- PyObject_Del(s);
- }
+ s->fi = rpmfiFree(s->fi);
+ s->ob_type->tp_free((PyObject *)s);
}
static int
static void rpmmi_dealloc(rpmmiObject * s)
{
- if (s) {
- s->mi = rpmdbFreeIterator(s->mi);
- Py_DECREF(s->ref);
- PyObject_Del(s);
- }
+ s->mi = rpmdbFreeIterator(s->mi);
+ Py_DECREF(s->ref);
+ s->ob_type->tp_free((PyObject *)s);
}
static char rpmmi_doc[] =
static void
rpmps_dealloc(rpmpsObject * s)
{
- if (s) {
- s->ps = rpmpsFree(s->ps);
- PyObject_Del(s);
- }
+ s->ps = rpmpsFree(s->ps);
+ s->ob_type->tp_free((PyObject *)s);
}
static int
/* this will free the keyList, and decrement the ref count of all
the items on the list as well :-) */
Py_DECREF(s->keyList);
- PyObject_Del((PyObject *)s);
+ s->ob_type->tp_free((PyObject *)s);
}
static PyObject * rpmts_getattro(PyObject * o, PyObject * n)
static void
spec_dealloc(specObject * s)
{
- if (s->spec) {
- s->spec=freeSpec(s->spec);
- }
- PyObject_Del(s);
+ if (s->spec) {
+ s->spec=freeSpec(s->spec);
+ }
+ s->ob_type->tp_free((PyObject *)s);
}
/* XXX TODO return something sensible if spec exists but component (eg %clean)