diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-03 17:27:33 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-03 17:27:33 +0200 |
| commit | 7051066cf258caa2a3fd45271faa3d46b8a6d98a (patch) | |
| tree | 45efe66d83002d258e739214050a262c75e672cd /python/pkgrecords.cc | |
| parent | 7d6f85c475d5f50e0c54814cd8b644e38147b282 (diff) | |
| download | python-apt-7051066cf258caa2a3fd45271faa3d46b8a6d98a.tar.gz | |
python/: Convert most names to PEP8 naming conventions (except Version,PackageFile,MetaIndex).
On our way to close Bug#481061, this converts almost all names to PEP 8 naming
conventions. Missing are now apt_pkg.Version, apt_pkg.PackageFile, apt_pkg.MetaIndex
and apt.progress.*.
In case of the missing apt_pkg classes, they are not converted yet because they
do not use getset descriptors yet.
apt.progress.* has not been converted yet because the extension interacts with it,
and we first need to modify the extension to recognize the new names, as well as
the old names (old applications shouldn't break).
Diffstat (limited to 'python/pkgrecords.cc')
| -rw-r--r-- | python/pkgrecords.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/python/pkgrecords.cc b/python/pkgrecords.cc index 1cccfce2..f9e48352 100644 --- a/python/pkgrecords.cc +++ b/python/pkgrecords.cc @@ -49,7 +49,10 @@ static PyObject *PkgRecordsLookup(PyObject *Self,PyObject *Args) static PyMethodDef PkgRecordsMethods[] = { + {"lookup",PkgRecordsLookup,METH_VARARGS,"Changes to a new package"}, + #ifdef COMPAT_0_7 {"Lookup",PkgRecordsLookup,METH_VARARGS,"Changes to a new package"}, + #endif {} }; @@ -117,6 +120,19 @@ static PyObject *PkgRecordsGetRecord(PyObject *Self,void*) { return PyString_FromStringAndSize(start,stop-start); } static PyGetSetDef PkgRecordsGetSet[] = { + {"filename",PkgRecordsGetFileName}, + {"homepage",PkgRecordsGetHomepage}, + {"longdesc",PkgRecordsGetLongDesc}, + {"md5",PkgRecordsGetMD5Hash}, + {"maintainer",PkgRecordsGetMaintainer}, + {"name",PkgRecordsGetName}, + {"record",PkgRecordsGetRecord}, + {"sha1",PkgRecordsGetSHA1Hash}, + {"sha256",PkgRecordsGetSHA256Hash}, + {"shortdesc",PkgRecordsGetShortDesc}, + {"sourcepkg",PkgRecordsGetSourcePkg}, + {"sourcever",PkgRecordsGetSourceVer}, +#ifdef COMPAT_0_7 {"FileName",PkgRecordsGetFileName}, {"Homepage",PkgRecordsGetHomepage}, {"LongDesc",PkgRecordsGetLongDesc}, @@ -129,6 +145,7 @@ static PyGetSetDef PkgRecordsGetSet[] = { {"ShortDesc",PkgRecordsGetShortDesc}, {"SourcePkg",PkgRecordsGetSourcePkg}, {"SourceVer",PkgRecordsGetSourceVer}, +#endif {} }; |
