summaryrefslogtreecommitdiff
path: root/python/pkgrecords.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/pkgrecords.cc')
-rw-r--r--python/pkgrecords.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/python/pkgrecords.cc b/python/pkgrecords.cc
index 93bc54d9..18240ce0 100644
--- a/python/pkgrecords.cc
+++ b/python/pkgrecords.cc
@@ -16,20 +16,20 @@
#include <Python.h>
/*}}}*/
-
+
// PkgRecords Class /*{{{*/
// ---------------------------------------------------------------------
static PyObject *PkgRecordsLookup(PyObject *Self,PyObject *Args)
-{
+{
PkgRecordsStruct &Struct = GetCpp<PkgRecordsStruct>(Self);
-
+
PyObject *PkgFObj;
long int Index;
if (PyArg_ParseTuple(Args,"(O!l)",&PackageFileType,&PkgFObj,&Index) == 0)
return 0;
-
+
// Get the index and check to make sure it is reasonable
pkgCache::PkgFileIterator &PkgF = GetCpp<pkgCache::PkgFileIterator>(PkgFObj);
pkgCache *Cache = PkgF.Cache();
@@ -39,15 +39,15 @@ static PyObject *PkgRecordsLookup(PyObject *Self,PyObject *Args)
PyErr_SetNone(PyExc_IndexError);
return 0;
}
-
+
// Do the lookup
Struct.Last = &Struct.Records.Lookup(pkgCache::VerFileIterator(*Cache,Cache->VerFileP+Index));
// always return true (to make it consistent with the pkgsrcrecords object
return Py_BuildValue("i", 1);
}
-
-static PyMethodDef PkgRecordsMethods[] =
+
+static PyMethodDef PkgRecordsMethods[] =
{
{"Lookup",PkgRecordsLookup,METH_VARARGS,"Changes to a new package"},
{}
@@ -79,14 +79,14 @@ static PyObject *PkgRecordsAttr(PyObject *Self,char *Name)
return CppPyString(Struct.Last->Name());
else if (strcmp("Homepage",Name) == 0)
return CppPyString(Struct.Last->Homepage());
- else if (strcmp("Record", Name) == 0)
+ else if (strcmp("Record", Name) == 0)
{
const char *start, *stop;
Struct.Last->GetRec(start, stop);
return PyString_FromStringAndSize(start,stop-start);
}
}
-
+
return Py_FindMethod(PkgRecordsMethods,Self,Name);
}
PyTypeObject PkgRecordsType =