From e671358386435b738bedc8944e8d9089682627fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Sat, 14 Mar 2009 12:46:33 +0100 Subject: [PATCH] Update britney-py.c to work with Python 2.5. These changes are cherry-picked from britney1 (7e94274 and f50c039). Commit messages follow. 7e94274: Use python 2.5. f50c039: use PyObject_DEL() for memory allocated with PyObject_NEW(). See http://www.python.org/doc/2.5.4/whatsnew/ports.html (section about "obmalloc"): Python 2.5 is no longer lenient about code that mixes NEW/DEL from different memory families of functions. --- lib/britney-py.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/britney-py.c b/lib/britney-py.c index 8e685c8..f5be109 100644 --- a/lib/britney-py.c +++ b/lib/britney-py.c @@ -1,4 +1,4 @@ -#include +#include #include "dpkg.h" @@ -54,7 +54,7 @@ static void dpkgpackages_dealloc(dpkgpackages *self) { Py_XDECREF(self->ref); self->pkgs = NULL; self->ref = NULL; - PyMem_DEL(self); + PyObject_DEL(self); } @@ -456,7 +456,7 @@ end: static void dpkgsources_dealloc(dpkgsources *self) { free_sources(self->srcs); self->srcs = NULL; - PyMem_DEL(self); + PyObject_DEL(self); } static PyObject *dpkgsources_packages(dpkgsources *self, PyObject *args) @@ -678,7 +678,7 @@ static void dpkgsrcsn_dealloc(dpkgsrcsn *self) { Py_XDECREF(self->refs); self->refs = NULL; - PyMem_DEL(self); + PyObject_DEL(self); } static PyObject *dpkgsrcsn_removesource(dpkgsrcsn *self, PyObject *args) {