From: Jan Kratochvil Date: Fri, 20 Apr 2012 07:17:58 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fb2c64af1600ac1928a66464539b4177aaaed1a;p=binutils-gdb.git gdb/ Fix compilation compatibility with python-2.4 * python/py-type.c (convert_field): Cast ADDRSTRING for PyObject_SetAttrString as non-const. New comment. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 521940c8b71..38e48190fb5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2012-04-20 Jan Kratochvil + + 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 * top.c (quit_target): Use all_cleanups. diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 23808af4886..5c1d8e64aed 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -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; }