summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-08-14 11:30:07 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-08-14 11:30:07 +0300
commit511d41abc5089884329a681935976c459b141af9 (patch)
tree2922ae543029ae63327cef3f29df291c65341dcf /python
parent883253ea6af71f8063d7a045841c35bad22147e2 (diff)
downloadrpm-511d41abc5089884329a681935976c459b141af9.tar.gz
rpm-511d41abc5089884329a681935976c459b141af9.tar.bz2
rpm-511d41abc5089884329a681935976c459b141af9.zip
Add isSource() method to python header object (ticket #32)
Diffstat (limited to 'python')
-rw-r--r--python/header-py.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/header-py.c b/python/header-py.c
index 8ec2cb4e6..5049db192 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -283,6 +283,11 @@ static PyObject * hdrSprintf(hdrObject * s, PyObject * args, PyObject * kwds)
return result;
}
+static PyObject *hdrIsSource(hdrObject *s)
+{
+ return PyBool_FromLong(headerIsSource(s->h));
+}
+
/**
*/
static int hdr_compare(hdrObject * a, hdrObject * b)
@@ -310,6 +315,8 @@ static struct PyMethodDef hdr_methods[] = {
NULL },
{"sprintf", (PyCFunction) hdrSprintf, METH_VARARGS|METH_KEYWORDS,
NULL },
+ {"isSource", (PyCFunction)hdrIsSource, METH_NOARGS,
+ NULL },
{"dsOfHeader", (PyCFunction)hdr_dsOfHeader, METH_NOARGS,
NULL},