diff options
author | jbj <devnull@localhost> | 2002-12-03 21:00:38 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-12-03 21:00:38 +0000 |
commit | 0717d19bb11f312bfeba9a43651a72581dcd6a21 (patch) | |
tree | 34e0c8d0ba02f254b75c012fb98e970a98439b89 /python/rpmte-py.c | |
parent | c96202ddef5c4ffcc3da81e1915b84e8f2a6102c (diff) | |
download | rpm-0717d19bb11f312bfeba9a43651a72581dcd6a21.tar.gz rpm-0717d19bb11f312bfeba9a43651a72581dcd6a21.tar.bz2 rpm-0717d19bb11f312bfeba9a43651a72581dcd6a21.zip |
Add new rpmte methods.
CVS patchset: 5914
CVS date: 2002/12/03 21:00:38
Diffstat (limited to 'python/rpmte-py.c')
-rw-r--r-- | python/rpmte-py.c | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/python/rpmte-py.c b/python/rpmte-py.c index 87eb54a81..7a0ac8e21 100644 --- a/python/rpmte-py.c +++ b/python/rpmte-py.c @@ -150,8 +150,40 @@ static PyObject * rpmte_AddedKey(rpmteObject * s, PyObject * args) /*@*/ { - if (!PyArg_ParseTuple(args, ":Degree")) return NULL; - return Py_BuildValue("i", rpmteDegree(s->te)); + if (!PyArg_ParseTuple(args, ":AddedKey")) return NULL; + return Py_BuildValue("i", rpmteAddedKey(s->te)); +} + +static PyObject * +rpmte_DependsOnKey(rpmteObject * s, PyObject * args) + /*@*/ +{ + if (!PyArg_ParseTuple(args, ":DependsOnKey")) return NULL; + return Py_BuildValue("i", rpmteDependsOnKey(s->te)); +} + +static PyObject * +rpmte_DBOffset(rpmteObject * s, PyObject * args) + /*@*/ +{ + if (!PyArg_ParseTuple(args, ":DBOffset")) return NULL; + return Py_BuildValue("i", rpmteDBOffset(s->te)); +} + +static PyObject * +rpmte_Key(rpmteObject * s, PyObject * args) + /*@*/ +{ + PyObject * Key; + + if (!PyArg_ParseTuple(args, ":Key")) return NULL; + /* XXX how to insure this is a PyObject??? */ + Key = (PyObject *) rpmteKey(s->te); + if (Key == NULL) { + Py_INCREF(Py_None); + return Py_None; + } + return Key; } static PyObject * @@ -250,6 +282,12 @@ static struct PyMethodDef rpmte_methods[] = { NULL}, {"AddedKey",(PyCFunction)rpmte_AddedKey, METH_VARARGS, NULL}, + {"DependsOnKey",(PyCFunction)rpmte_DependsOnKey, METH_VARARGS, + NULL}, + {"DBOffset",(PyCFunction)rpmte_DBOffset, METH_VARARGS, + NULL}, + {"Key", (PyCFunction)rpmte_Key, METH_VARARGS, + NULL}, {"DS", (PyCFunction)rpmte_DS, METH_VARARGS, "te.DS(TagN) -> DS\n\ - Return the TagN dependency set (or None). TagN is one of\n\ |