Fix compilation compatibility with python-2.4
	* python/py-type.c (convert_field): Cast ADDRSTRING for
	PyObject_SetAttrString as non-const.  New comment.
This commit is contained in:
Jan Kratochvil 2012-04-20 07:17:58 +00:00
parent d5003ebff0
commit 4fb2c64af1
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compilation compatibility with python-2.4
* python/py-type.c (convert_field): Cast ADDRSTRING for
PyObject_SetAttrString as non-const. New comment.
2012-04-19 Tom Tromey <tromey@redhat.com>
* top.c (quit_target): Use all_cleanups.

View File

@ -183,7 +183,8 @@ convert_field (struct type *type, int field)
if (!arg)
goto fail;
if (PyObject_SetAttrString (result, attrstring, arg) < 0)
/* At least python-2.4 had the second parameter non-const. */
if (PyObject_SetAttrString (result, (char *) attrstring, arg) < 0)
goto failarg;
}