gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 20 Apr 2012 07:17:58 +0000 (07:17 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 20 Apr 2012 07:17:58 +0000 (07:17 +0000)
Fix compilation compatibility with python-2.4
* python/py-type.c (convert_field): Cast ADDRSTRING for
PyObject_SetAttrString as non-const.  New comment.

gdb/ChangeLog
gdb/python/py-type.c

index 521940c8b71b0131ac302cdc3af8ef576f786141..38e48190fb59f7605704f314ddb647d5f229b4a9 100644 (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.
index 23808af488684c61338e0f73f4209c29fec900c6..5c1d8e64aed0896d7940332bfaf561346d4920ed 100644 (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;
     }