diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-22 18:16:28 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-22 18:16:28 +0200 |
| commit | 544f14e0f2fb70b5a1f30786a93023a42d88290d (patch) | |
| tree | 22a6cb60e5bc61e2c45f7cae37acd96a9419b4c3 /python/python-apt.h | |
| parent | 6ba42d2e31f161fc0ebe5405cf63b616c3e822b4 (diff) | |
| download | python-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.h | 5 |
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); |
