From c6858a77337cc03f403b7d09c7eac0575db08942 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 16 Jul 2009 14:49:41 +0200 Subject: python/opprogress.cc: Increase the reference count before returning values. --- python/opprogress.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') 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; } -- cgit v1.2.3