summaryrefslogtreecommitdiff
path: root/python/rpmte-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-09-22 21:24:55 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-09-22 21:24:55 +0300
commited557bbcf065905beebb42d50048cecf04c3e441 (patch)
tree98eb48fdb97851d4d807d4cfabef1a89e7aa381f /python/rpmte-py.c
parent4d6f8e46e03ccb81a0f50848e974884b7874912d (diff)
downloadlibrpm-tizen-ed557bbcf065905beebb42d50048cecf04c3e441.tar.gz
librpm-tizen-ed557bbcf065905beebb42d50048cecf04c3e441.tar.bz2
librpm-tizen-ed557bbcf065905beebb42d50048cecf04c3e441.zip
Make all python object creation wrappers return PyObject pointers
- this way the only place where casts are needed are in the wrapper itself
Diffstat (limited to 'python/rpmte-py.c')
-rw-r--r--python/rpmte-py.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/rpmte-py.c b/python/rpmte-py.c
index 0a761cc0c..e59a275eb 100644
--- a/python/rpmte-py.c
+++ b/python/rpmte-py.c
@@ -204,7 +204,7 @@ rpmte_DS(rpmteObject * s, PyObject * args, PyObject * kwds)
Py_RETURN_NONE;
#endif
}
- return (PyObject *) rpmds_Wrap(rpmdsLink(ds, RPMDBG_M("rpmte_DS")));
+ return rpmds_Wrap(rpmdsLink(ds, RPMDBG_M("rpmte_DS")));
}
static PyObject *
@@ -216,7 +216,7 @@ rpmte_FI(rpmteObject * s, PyObject * args, PyObject * kwds)
if (fi == NULL) {
Py_RETURN_NONE;
}
- return (PyObject *) rpmfi_Wrap(rpmfiLink(fi, RPMDBG_M("rpmte_FI")));
+ return rpmfi_Wrap(rpmfiLink(fi, RPMDBG_M("rpmte_FI")));
}
/** \ingroup py_c
@@ -346,11 +346,11 @@ PyTypeObject rpmte_Type = {
0, /* tp_is_gc */
};
-rpmteObject * rpmte_Wrap(rpmte te)
+PyObject * rpmte_Wrap(rpmte te)
{
rpmteObject *s = PyObject_New(rpmteObject, &rpmte_Type);
if (s == NULL)
return NULL;
s->te = te;
- return s;
+ return (PyObject *) s;
}