summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-16 14:49:41 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-16 14:49:41 +0200
commitc6858a77337cc03f403b7d09c7eac0575db08942 (patch)
tree69a15d8601f385238e7e08450dfcc498104a8706 /python
parent6c9876724542889c6ee1542cf529b88ffa2cf456 (diff)
downloadpython-apt-c6858a77337cc03f403b7d09c7eac0575db08942.tar.gz
python/opprogress.cc: Increase the reference count before returning values.
Diffstat (limited to 'python')
-rw-r--r--python/opprogress.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/opprogress.cc b/python/opprogress.cc
index 450e290a..ba9acd14 100644
--- a/python/opprogress.cc
+++ b/python/opprogress.cc
@@ -42,6 +42,7 @@ static PyObject *opprogress_done(PyObject *Self, PyObject *args)
static PyObject *opprogress_get_op(PyOpProgressObject *self, void *closure)
{
+ Py_INCREF(self->op);
return self->op;
}
@@ -65,6 +66,7 @@ static int opprogress_set_op(PyOpProgressObject *self, PyObject *value,
static PyObject *opprogress_get_subop(PyOpProgressObject *self, void *closure)
{
+ Py_INCREF(self->subop);
return self->subop;
}