diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-01-13 17:50:30 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-01-13 17:50:30 +0100 |
| commit | 8b46b0c4bdfbaa07972311b1cf19616d5c5aff04 (patch) | |
| tree | 59167b2b8c1d331bfebf072d5ba84dd154f0b373 /python/sourcelist.cc | |
| parent | 6c1711a80a8a7d011f4d5f49618ff396ad2f5722 (diff) | |
| parent | 85839f4f241c99f9e4ebb0a6a8847a2d433f1160 (diff) | |
| download | python-apt-8b46b0c4bdfbaa07972311b1cf19616d5c5aff04.tar.gz | |
merge from the debian experimental branch
Diffstat (limited to 'python/sourcelist.cc')
| -rw-r--r-- | python/sourcelist.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/python/sourcelist.cc b/python/sourcelist.cc index 76df015d..5dcaf86b 100644 --- a/python/sourcelist.cc +++ b/python/sourcelist.cc @@ -17,18 +17,18 @@ /*}}}*/ - + // PkgsourceList Class /*{{{*/ // --------------------------------------------------------------------- static char *doc_PkgSourceListFindIndex = "xxx"; static PyObject *PkgSourceListFindIndex(PyObject *Self,PyObject *Args) -{ +{ pkgSourceList *list = GetCpp<pkgSourceList*>(Self); PyObject *pyPkgFileIter; PyObject *pyPkgIndexFile; - if (PyArg_ParseTuple(Args, "O!", &PackageFileType,&pyPkgFileIter) == 0) + if (PyArg_ParseTuple(Args, "O!", &PackageFileType,&pyPkgFileIter) == 0) return 0; pkgCache::PkgFileIterator &i = GetCpp<pkgCache::PkgFileIterator>(pyPkgFileIter); @@ -40,7 +40,7 @@ static PyObject *PkgSourceListFindIndex(PyObject *Self,PyObject *Args) } //&PackageIndexFileType,&pyPkgIndexFile) - + Py_INCREF(Py_None); return Py_None; } @@ -61,7 +61,7 @@ static PyObject *PkgSourceListGetIndexes(PyObject *Self,PyObject *Args) PyObject *pyFetcher; char all = 0; - if (PyArg_ParseTuple(Args, "O!|b",&PkgAcquireType,&pyFetcher, &all) == 0) + if (PyArg_ParseTuple(Args, "O!|b",&PkgAcquireType,&pyFetcher, &all) == 0) return 0; pkgAcquire *fetcher = GetCpp<pkgAcquire*>(pyFetcher); @@ -70,7 +70,7 @@ static PyObject *PkgSourceListGetIndexes(PyObject *Self,PyObject *Args) return HandleErrors(Py_BuildValue("b",res)); } -static PyMethodDef PkgSourceListMethods[] = +static PyMethodDef PkgSourceListMethods[] = { {"FindIndex",PkgSourceListFindIndex,METH_VARARGS,doc_PkgSourceListFindIndex}, {"ReadMainList",PkgSourceListReadMainList,METH_VARARGS,doc_PkgSourceListReadMainList}, @@ -85,13 +85,13 @@ static PyObject *PkgSourceListAttr(PyObject *Self,char *Name) if (strcmp("List",Name) == 0) { PyObject *List = PyList_New(0); - for (vector<metaIndex *>::const_iterator I = list->begin(); + for (vector<metaIndex *>::const_iterator I = list->begin(); I != list->end(); I++) { PyObject *Obj; Obj = CppPyObject_NEW<metaIndex*>(&MetaIndexType,*I); PyList_Append(List,Obj); - } + } return List; } return Py_FindMethod(PkgSourceListMethods,Self,Name); |
