summaryrefslogtreecommitdiff
path: root/python/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2010-12-22 11:11:10 +0100
committerMichael Vogt <mvo@debian.org>2010-12-22 11:11:10 +0100
commitd3d1874886839dabdabeab94ccee7b1fb449c66e (patch)
tree5ad17ad8dc07c02af00a4fc24e34896f7f2442e2 /python/depcache.cc
parent674f6c2e21b8f59a6a23089eb8da5f210f865bc2 (diff)
parent33dd13058d468772153e3182c7d8b126f1e0f6ba (diff)
downloadpython-apt-d3d1874886839dabdabeab94ccee7b1fb449c66e.tar.gz
merged from lp:~mvo/python-apt/mvo
Diffstat (limited to 'python/depcache.cc')
-rw-r--r--python/depcache.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/depcache.cc b/python/depcache.cc
index 014ad7ae..a84eb615 100644
--- a/python/depcache.cc
+++ b/python/depcache.cc
@@ -989,7 +989,8 @@ static const char *actiongroup__enter__doc =
static PyObject *PkgActionGroupEnter(PyObject *Self,PyObject *Args) {
if (PyArg_ParseTuple(Args,"") == 0)
return 0;
- return Self;
+ Py_INCREF(Self);
+ return Self;
}
static const char *actiongroup__exit__doc =
@@ -999,6 +1000,7 @@ static PyObject *PkgActionGroupExit(PyObject *Self,PyObject *Args) {
pkgDepCache::ActionGroup *ag = GetCpp<pkgDepCache::ActionGroup*>(Self);
if (ag != NULL)
ag->release();
+ Py_DECREF(Self);
Py_RETURN_FALSE;
}