diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-04-20 07:17:58 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-04-20 07:17:58 +0000 |
commit | 4fb2c64af1600ac1928a66464539b4177aaaed1a (patch) | |
tree | 820f75e113933027184a92c6d3c311e8e8279a83 /gdb/python | |
parent | d5003ebff0147632214c714812a0422a57836456 (diff) | |
download | gdb-4fb2c64af1600ac1928a66464539b4177aaaed1a.zip gdb-4fb2c64af1600ac1928a66464539b4177aaaed1a.tar.gz gdb-4fb2c64af1600ac1928a66464539b4177aaaed1a.tar.bz2 |
gdb/
Fix compilation compatibility with python-2.4
* python/py-type.c (convert_field): Cast ADDRSTRING for
PyObject_SetAttrString as non-const. New comment.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-type.c | 3 |
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; } |