diff options
| -rw-r--r-- | debian/changelog | 1 | ||||
| -rw-r--r-- | python/pkgrecords.cc | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 2e8ec5c7..3b84dd1e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ python-apt (0.6.16.1) unstable; urgency=low * memleak fixed when pkgCache objects are deallocated * typos fixed (thanks to Gustavo Franco) + * pkgRecords.Record added to get raw record data -- diff --git a/python/pkgrecords.cc b/python/pkgrecords.cc index a85b570a..c6f5aeb9 100644 --- a/python/pkgrecords.cc +++ b/python/pkgrecords.cc @@ -73,6 +73,12 @@ static PyObject *PkgRecordsAttr(PyObject *Self,char *Name) return CppPyString(Struct.Last->LongDesc()); else if (strcmp("Name",Name) == 0) return CppPyString(Struct.Last->Name()); + 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); |
