From 940c6ecb9e7494414c4554fa4487cb5d17b5dadb Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 24 Jan 2006 17:30:07 +0000 Subject: * added pkgRecords.Record --- debian/changelog | 1 + python/pkgrecords.cc | 6 ++++++ 2 files changed, 7 insertions(+) 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); -- cgit v1.2.3