diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-03-16 15:01:24 +0100 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-03-16 15:04:38 +0100 |
commit | 49840f2a6669ae2366c522da41edf615785b3626 (patch) | |
tree | 379f67901c22826ab7d9a8dcf7549383e0f84d9d | |
parent | c296d686edc052490d31385f9a2712462b33f648 (diff) | |
download | gdb-49840f2a6669ae2366c522da41edf615785b3626.zip gdb-49840f2a6669ae2366c522da41edf615785b3626.tar.gz gdb-49840f2a6669ae2366c522da41edf615785b3626.tar.bz2 |
Fix Python 2.4 build break
This fixes a build failure against Python 2.4 by casting away "const"
on the second argument to PyObject_GetAttrString. Similar casts to
support Python 2.4 were already present in a number of other places.
gdb/
2014-03-16 Ulrich Weigand <uweigand@de.ibm.com>
* python/py-value.c (get_field_flag): Cast flag_name argument to
PyObject_GetAttrString to support Python 2.4.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/py-value.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7a9a8a8..d42b9e6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-03-16 Ulrich Weigand <uweigand@de.ibm.com> + + * python/py-value.c (get_field_flag): Cast flag_name argument to + PyObject_GetAttrString to support Python 2.4. + 2014-03-14 Jan Kratochvil <jan.kratochvil@redhat.com> * MAINTAINERS (The Official FSF-appointed GDB Maintainers) diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 75aa642..a118f6c 100644 --- a/gdb/python/py-value.c +++ b/gdb/python/py-value.c @@ -551,7 +551,8 @@ static int get_field_flag (PyObject *field, const char *flag_name) { int flag_value; - PyObject *flag_object = PyObject_GetAttrString (field, flag_name); + /* Python 2.4 did not have a 'const' here. */ + PyObject *flag_object = PyObject_GetAttrString (field, (char *) flag_name); if (flag_object == NULL) return -1; |