summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-11-22 11:30:50 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-11-22 11:30:50 +0000
commitc1ee07ec049974cf8a54160b52881404b6347f43 (patch)
treea4116e06c861898eaeb426bfa764aae159a0cac8
parentf398b1a5833fdf50f8c0c541958d5770ea767be8 (diff)
downloadpython-apt-c1ee07ec049974cf8a54160b52881404b6347f43.tar.gz
* another bugfix in the new pkgPackageManager wrapper
-rw-r--r--doc/examples/acquire.py1
-rw-r--r--python/pkgmanager.cc6
2 files changed, 3 insertions, 4 deletions
diff --git a/doc/examples/acquire.py b/doc/examples/acquire.py
index a5de0029..72d0c74e 100644
--- a/doc/examples/acquire.py
+++ b/doc/examples/acquire.py
@@ -53,3 +53,4 @@ res = pm.DoInstall(1)
print "pm.DoInstall() returned: %s"% res
+
diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc
index b4c64d3e..133db755 100644
--- a/python/pkgmanager.cc
+++ b/python/pkgmanager.cc
@@ -99,10 +99,10 @@ PyTypeObject PkgManagerType =
PyObject_HEAD_INIT(&PyType_Type)
0, // ob_size
"PackageManager", // tp_name
- sizeof(CppOwnedPyObject<pkgPackageManager*>), // tp_basicsize
+ sizeof(CppPyObject<pkgPackageManager*>), // tp_basicsize
0, // tp_itemsize
// Methods
- CppOwnedDealloc<pkgPackageManager*>, // tp_dealloc
+ CppDealloc<pkgPackageManager*>, // tp_dealloc
0, // tp_print
PkgManagerAttr, // tp_getattr
0, // tp_setattr
@@ -128,8 +128,6 @@ PyObject *GetPkgManager(PyObject *Self,PyObject *Args)
CppPyObject<pkgPackageManager*> *PkgManagerObj =
CppPyObject_NEW<pkgPackageManager*>(&PkgManagerType,pm);
- // FIXME: mem-leak???
- Py_INCREF(PkgManagerObj);
return PkgManagerObj;
}