From 2e32d8d27f84b585ef8196a28bdd2e649de02607 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 20 Jan 2010 17:06:11 +0100 Subject: Rename apt_pkg.PackageIndexFile to apt_pkg.IndexFile. --- python/indexfile.cc | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'python/indexfile.cc') diff --git a/python/indexfile.cc b/python/indexfile.cc index a6f8904e..7accaa50 100644 --- a/python/indexfile.cc +++ b/python/indexfile.cc @@ -15,7 +15,7 @@ #include -static PyObject *PackageIndexFileArchiveURI(PyObject *Self,PyObject *Args) +static PyObject *IndexFileArchiveURI(PyObject *Self,PyObject *Args) { pkgIndexFile *File = GetCpp(Self); char *path; @@ -25,38 +25,38 @@ static PyObject *PackageIndexFileArchiveURI(PyObject *Self,PyObject *Args) return HandleErrors(Safe_FromString(File->ArchiveURI(path).c_str())); } -static PyMethodDef PackageIndexFileMethods[] = +static PyMethodDef IndexFileMethods[] = { - {"archive_uri",PackageIndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"}, + {"archive_uri",IndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"}, #ifdef COMPAT_0_7 - {"ArchiveURI",PackageIndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"}, + {"ArchiveURI",IndexFileArchiveURI,METH_VARARGS,"Returns the ArchiveURI"}, #endif {} }; #define File (GetCpp(Self)) -static PyObject *PackageIndexFileGetLabel(PyObject *Self,void*) { +static PyObject *IndexFileGetLabel(PyObject *Self,void*) { return Safe_FromString(File->GetType()->Label); } -static PyObject *PackageIndexFileGetDescribe(PyObject *Self,void*) { +static PyObject *IndexFileGetDescribe(PyObject *Self,void*) { return Safe_FromString(File->Describe().c_str()); } -static PyObject *PackageIndexFileGetExists(PyObject *Self,void*) { +static PyObject *IndexFileGetExists(PyObject *Self,void*) { return Py_BuildValue("i",(File->Exists())); } -static PyObject *PackageIndexFileGetHasPackages(PyObject *Self,void*) { +static PyObject *IndexFileGetHasPackages(PyObject *Self,void*) { return Py_BuildValue("i",(File->HasPackages())); } -static PyObject *PackageIndexFileGetSize(PyObject *Self,void*) { +static PyObject *IndexFileGetSize(PyObject *Self,void*) { return Py_BuildValue("i",(File->Size())); } -static PyObject *PackageIndexFileGetIsTrusted(PyObject *Self,void*) { +static PyObject *IndexFileGetIsTrusted(PyObject *Self,void*) { return Py_BuildValue("i",(File->IsTrusted())); } #undef File #define S(x) (x ? x : "") -static PyObject *PackageIndexFileRepr(PyObject *Self) +static PyObject *IndexFileRepr(PyObject *Self) { pkgIndexFile *File = GetCpp(Self); return PyString_FromFormat("), // tp_basicsize 0, // tp_itemsize // Methods @@ -100,7 +100,7 @@ PyTypeObject PyPackageIndexFile_Type = 0, // tp_getattr 0, // tp_setattr 0, // tp_compare - PackageIndexFileRepr, // tp_repr + IndexFileRepr, // tp_repr 0, // tp_as_number 0, // tp_as_sequence 0, // tp_as_mapping @@ -118,9 +118,9 @@ PyTypeObject PyPackageIndexFile_Type = 0, // tp_weaklistoffset 0, // tp_iter 0, // tp_iternext - PackageIndexFileMethods, // tp_methods + IndexFileMethods, // tp_methods 0, // tp_members - PackageIndexFileGetSet, // tp_getset + IndexFileGetSet, // tp_getset }; -- cgit v1.2.3