summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-01-24 17:30:07 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2006-01-24 17:30:07 +0000
commit940c6ecb9e7494414c4554fa4487cb5d17b5dadb (patch)
tree51a10ffc40e39794f478fc89293e9ebfa39886d8
parent61f25c8c12ebe651eb187fed640a41c8ce466943 (diff)
downloadpython-apt-940c6ecb9e7494414c4554fa4487cb5d17b5dadb.tar.gz
* added pkgRecords.Record
-rw-r--r--debian/changelog1
-rw-r--r--python/pkgrecords.cc6
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);