summaryrefslogtreecommitdiff
path: root/python/python-apt.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-22 18:16:28 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-22 18:16:28 +0200
commit544f14e0f2fb70b5a1f30786a93023a42d88290d (patch)
tree22a6cb60e5bc61e2c45f7cae37acd96a9419b4c3 /python/python-apt.h
parent6ba42d2e31f161fc0ebe5405cf63b616c3e822b4 (diff)
downloadpython-apt-544f14e0f2fb70b5a1f30786a93023a42d88290d.tar.gz
python: 2nd part of the acquire fixes (one PyObject per C++ object).
Diffstat (limited to 'python/python-apt.h')
-rw-r--r--python/python-apt.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/python-apt.h b/python/python-apt.h
index 80ad03bd..fb84b394 100644
--- a/python/python-apt.h
+++ b/python/python-apt.h
@@ -220,7 +220,8 @@ static int import_apt_pkg(void) {
// Python object creation, using two inline template functions and one variadic
// macro per type.
template<class Cpp>
-inline PyObject *FromCpp(PyTypeObject *pytype, Cpp obj, bool Delete=false)
+inline CppPyObject<Cpp> *FromCpp(PyTypeObject *pytype, Cpp obj,
+ bool Delete=false)
{
CppPyObject<Cpp> *Obj = CppPyObject_NEW<Cpp>(pytype, obj);
Obj->NoDelete = (!Delete);
@@ -228,7 +229,7 @@ inline PyObject *FromCpp(PyTypeObject *pytype, Cpp obj, bool Delete=false)
}
template<class Cpp>
-inline PyObject *FromCppOwned(PyTypeObject *pytype, Cpp const &obj,
+inline CppOwnedPyObject<Cpp> *FromCppOwned(PyTypeObject *pytype, Cpp const &obj,
bool Delete=false, PyObject *Owner=NULL)
{
CppOwnedPyObject<Cpp> *Obj = CppOwnedPyObject_NEW<Cpp>(Owner, pytype, obj);