Casts on lvalues are no longer permitted by gcc4.0.

CVS patchset: 7788
CVS date: 2005/03/07 14:00:18
This commit is contained in:
jbj 2005-03-07 14:00:18 +00:00
parent 9dc1b3bb80
commit ffea31644e
2 changed files with 3 additions and 3 deletions

View File

@ -477,7 +477,7 @@ static PyObject * hdr_subscript(hdrObject * s, PyObject * item)
while (extensions->name) { while (extensions->name) {
if (extensions->type == HEADER_EXT_TAG if (extensions->type == HEADER_EXT_TAG
&& !xstrcasecmp(extensions->name + 7, str)) { && !xstrcasecmp(extensions->name + 7, str)) {
(const struct headerSprintfExtension *) ext = extensions; ext = extensions;
} }
extensions++; extensions++;
} }

View File

@ -293,7 +293,7 @@ void init_rpm(void)
while (extensions->name) { while (extensions->name) {
if (extensions->type == HEADER_EXT_TAG) { if (extensions->type == HEADER_EXT_TAG) {
(const struct headerSprintfExtension *) ext = extensions; ext = extensions;
PyDict_SetItemString(d, (char *) extensions->name, o=PyCObject_FromVoidPtr(ext, NULL)); PyDict_SetItemString(d, (char *) extensions->name, o=PyCObject_FromVoidPtr(ext, NULL));
Py_DECREF(o); Py_DECREF(o);
PyDict_SetItem(dict, tag, o=PyString_FromString(ext->name + 7)); PyDict_SetItem(dict, tag, o=PyString_FromString(ext->name + 7));