From 24135b8443d01af4ff0c23ec11794787b0feb673 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 1 Oct 2009 11:17:38 +0300 Subject: [PATCH] Add python getter for transaction id --- python/rpmts-py.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/rpmts-py.c b/python/rpmts-py.c index c80301f..3647662 100644 --- a/python/rpmts-py.c +++ b/python/rpmts-py.c @@ -981,6 +981,11 @@ static PyObject * rpmts_new(PyTypeObject * subtype, PyObject *args, PyObject *kw return rpmts_Wrap(subtype, ts); } +static PyObject *rpmts_get_tid(rpmtsObject *s, void *closure) +{ + return Py_BuildValue("i", rpmtsGetTid(s->ts)); +} + static int rpmts_set_scriptFd(rpmtsObject *s, PyObject *value, void *closure) { int rc = 0; @@ -1002,6 +1007,7 @@ static char rpmts_doc[] = static PyGetSetDef rpmts_getseters[] = { /* only provide a setter until we have rpmfd wrappings */ {"scriptFd", NULL, (setter)rpmts_set_scriptFd, NULL }, + {"tid", (getter)rpmts_get_tid, NULL, NULL }, { NULL } }; -- 2.7.4