diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-31 14:55:02 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-31 14:55:02 +0200 |
| commit | c41f809bef5b591d36d6bbb663841a9434eb77fb (patch) | |
| tree | ee44a80c5bfcc8be0c2872b4093d62c83b84cc30 /python/apt_pkgmodule.cc | |
| parent | ebe1f37a65cae8303bf86da13f3f2107cd73d1fe (diff) | |
| download | python-apt-c41f809bef5b591d36d6bbb663841a9434eb77fb.tar.gz | |
python/configuration.cc, apt_pkgmodule.cc: Fix Configuration segfaults.
In apt_pkgmodule, change the type to Configuration*. In configuration.cc,
check that GetSelf(Self).Tree(0) != 0 before doing GetSelf(Self).Tree(0)->Parent.
Diffstat (limited to 'python/apt_pkgmodule.cc')
| -rw-r--r-- | python/apt_pkgmodule.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 9e486a91..d53f64a6 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -56,7 +56,7 @@ static PyObject *newConfiguration(PyObject *self,PyObject *args) { PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.newConfiguration() is " "deprecated. Use apt_pkg.Configuration() instead.", 1); - return CppPyObject_NEW<Configuration>(&PyConfiguration_Type); + return CppOwnedPyObject_NEW<Configuration*>(NULL, &PyConfiguration_Type, new Configuration()); } #endif /*}}}*/ |
