aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-type.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 23808af..5c1d8e6 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;
}