From: Panu Matilainen Date: Thu, 1 Oct 2009 08:17:38 +0000 (+0300) Subject: Add python getter for transaction id X-Git-Tag: tznext/4.11.0.1.tizen20130304~2650 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24135b8443d01af4ff0c23ec11794787b0feb673;p=tools%2Flibrpm-tizen.git Add python getter for transaction id --- 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 } };