summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-07-12 13:27:07 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-07-12 13:27:07 +0300
commit7e6084ad8293c2172362eac9e140a478f2883a9f (patch)
tree176454b92615f90ba5456179e471074bf231744e /python
parent85e427b2ef85c474d85ab2e57b2244dfd96e4fe8 (diff)
downloadrpm-7e6084ad8293c2172362eac9e140a478f2883a9f.tar.gz
rpm-7e6084ad8293c2172362eac9e140a478f2883a9f.tar.bz2
rpm-7e6084ad8293c2172362eac9e140a478f2883a9f.zip
One last fix for const qualifier discarding complaint in python.
OTOH we need to call PyCObject_FromVoidPtr() with non-const cast..
Diffstat (limited to 'python')
-rw-r--r--python/rpmmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/rpmmodule.c b/python/rpmmodule.c
index 4372ea1e5..9443e2826 100644
--- a/python/rpmmodule.c
+++ b/python/rpmmodule.c
@@ -192,7 +192,7 @@ void init_rpm(void)
PyObject * d, *o, * tag = NULL, * dict;
int i;
const struct headerSprintfExtension_s * extensions = rpmHeaderFormats;
- struct headerSprintfExtension_s * ext;
+ const struct headerSprintfExtension_s * ext;
PyObject * m;
#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */
@@ -294,7 +294,8 @@ void init_rpm(void)
while (extensions->name) {
if (extensions->type == HEADER_EXT_TAG) {
ext = extensions;
- PyDict_SetItemString(d, (char *) extensions->name, o=PyCObject_FromVoidPtr(ext, NULL));
+ o = PyCObject_FromVoidPtr((struct headerSprintfExtension_s *) ext, NULL);
+ PyDict_SetItemString(d, (char *) extensions->name, o);
Py_DECREF(o);
PyDict_SetItem(dict, tag, o=PyString_FromString(ext->name + 7));
Py_DECREF(o);