From 49840f2a6669ae2366c522da41edf615785b3626 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 16 Mar 2014 15:01:24 +0100 Subject: [PATCH] Fix Python 2.4 build break MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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  * python/py-value.c (get_field_flag): Cast flag_name argument to PyObject_GetAttrString to support Python 2.4. --- gdb/ChangeLog | 5 +++++ gdb/python/py-value.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7a9a8a8a1d6..d42b9e6b50e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-03-16 Ulrich Weigand  + + * python/py-value.c (get_field_flag): Cast flag_name argument to + PyObject_GetAttrString to support Python 2.4. + 2014-03-14 Jan Kratochvil * MAINTAINERS (The Official FSF-appointed GDB Maintainers) diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c index 75aa64221b7..a118f6ca739 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; -- 2.30.2