mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-12 11:51:09 +00:00
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.
This commit is contained in:
parent
ff434061e8
commit
17672ae8da
@ -1,4 +1,4 @@
|
|||||||
#include <python2.4/Python.h>
|
#include <python2.5/Python.h>
|
||||||
|
|
||||||
#include "dpkg.h"
|
#include "dpkg.h"
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ static void dpkgpackages_dealloc(dpkgpackages *self) {
|
|||||||
Py_XDECREF(self->ref);
|
Py_XDECREF(self->ref);
|
||||||
self->pkgs = NULL;
|
self->pkgs = NULL;
|
||||||
self->ref = NULL;
|
self->ref = NULL;
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -456,7 +456,7 @@ end:
|
|||||||
static void dpkgsources_dealloc(dpkgsources *self) {
|
static void dpkgsources_dealloc(dpkgsources *self) {
|
||||||
free_sources(self->srcs);
|
free_sources(self->srcs);
|
||||||
self->srcs = NULL;
|
self->srcs = NULL;
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *dpkgsources_packages(dpkgsources *self, PyObject *args)
|
static PyObject *dpkgsources_packages(dpkgsources *self, PyObject *args)
|
||||||
@ -678,7 +678,7 @@ static void dpkgsrcsn_dealloc(dpkgsrcsn *self) {
|
|||||||
Py_XDECREF(self->refs);
|
Py_XDECREF(self->refs);
|
||||||
self->refs = NULL;
|
self->refs = NULL;
|
||||||
|
|
||||||
PyMem_DEL(self);
|
PyObject_DEL(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *dpkgsrcsn_removesource(dpkgsrcsn *self, PyObject *args) {
|
static PyObject *dpkgsrcsn_removesource(dpkgsrcsn *self, PyObject *args) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user