diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-09-22 21:24:55 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-09-22 21:24:55 +0300 |
commit | ed557bbcf065905beebb42d50048cecf04c3e441 (patch) | |
tree | 98eb48fdb97851d4d807d4cfabef1a89e7aa381f /python/rpmmi-py.c | |
parent | 4d6f8e46e03ccb81a0f50848e974884b7874912d (diff) | |
download | librpm-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/rpmmi-py.c')
-rw-r--r-- | python/rpmmi-py.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c index fad151dc5..c1768d612 100644 --- a/python/rpmmi-py.c +++ b/python/rpmmi-py.c @@ -84,7 +84,7 @@ rpmmi_iternext(rpmmiObject * s) s->mi = rpmdbFreeIterator(s->mi); return NULL; } - return (PyObject *) hdr_Wrap(h); + return hdr_Wrap(h); } /** @@ -211,9 +211,9 @@ PyTypeObject rpmmi_Type = { 0, /* tp_is_gc */ }; -rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) +PyObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) { - rpmmiObject * mio = (rpmmiObject *) PyObject_New(rpmmiObject, &rpmmi_Type); + rpmmiObject * mio = PyObject_New(rpmmiObject, &rpmmi_Type); if (mio == NULL) { PyErr_SetString(pyrpmError, "out of memory creating rpmmiObject"); @@ -222,6 +222,6 @@ rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) mio->mi = mi; mio->ref = s; Py_INCREF(mio->ref); - return mio; + return (PyObject *) mio; } |