diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-12 13:57:23 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-12 13:57:23 +0200 |
| commit | cd4dd0427591d6357d875f881573b0b57bc0ae31 (patch) | |
| tree | 242b31ea1e77290d5bfdc32f96cfda1e65b6b0f6 | |
| parent | c45715cf0269bcef053025f01a1956b75bf3c859 (diff) | |
| download | python-apt-cd4dd0427591d6357d875f881573b0b57bc0ae31.tar.gz | |
python/sourcelist.cc: Do not delete the pkgIndexFile*, it is managed elsewhere.
| -rw-r--r-- | python/sourcelist.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/sourcelist.cc b/python/sourcelist.cc index aceb19ad..beb249dc 100644 --- a/python/sourcelist.cc +++ b/python/sourcelist.cc @@ -26,7 +26,7 @@ static PyObject *PkgSourceListFindIndex(PyObject *Self,PyObject *Args) { pkgSourceList *list = GetCpp<pkgSourceList*>(Self); PyObject *pyPkgFileIter; - PyObject *pyPkgIndexFile; + CppOwnedPyObject<pkgIndexFile*> *pyPkgIndexFile; if (PyArg_ParseTuple(Args, "O!", &PackageFileType,&pyPkgFileIter) == 0) return 0; @@ -36,6 +36,8 @@ static PyObject *PkgSourceListFindIndex(PyObject *Self,PyObject *Args) if(list->FindIndex(i, index)) { pyPkgIndexFile = CppOwnedPyObject_NEW<pkgIndexFile*>(pyPkgFileIter,&PackageIndexFileType,index); + // Do not delete the pkgIndexFile*, it is managed by pkgSourceList. + pyPkgIndexFile->NoDelete = true; return pyPkgIndexFile; } |
