aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@chromium.org>2014-06-04 10:50:11 -0700
committerSiva Chandra <sivachandra@chromium.org>2014-06-10 11:52:12 -0700
commit5a6c770930a54585c6d4bd9257ce7636b469d7c1 (patch)
treecffd264fe5becaf1e6d325885c7e569e03ab2d1e /gdb/python/py-value.c
parentd9949a367352c66b7d90ca32bdbd5cac38c14b53 (diff)
downloadbinutils-5a6c770930a54585c6d4bd9257ce7636b469d7c1.zip
binutils-5a6c770930a54585c6d4bd9257ce7636b469d7c1.tar.gz
binutils-5a6c770930a54585c6d4bd9257ce7636b469d7c1.tar.bz2
Wrap PyObject_Get/HasAttrString in a function with second arg having const qualifier.
This is done to avoid errors when compiled with -Werror against Python-2.4 which did not have the const qualifier for the second argument of these functions. gdb/ * python/python-internal.h (gdb_PyObject_GetAttrString) (gdb_PyObject_HasAttrString): New inline function definitions. * py-value.c (get_field_flag): Remove the now unnecessary cast to char * of the second argument to PyObject_GetAttrString.
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 54da67a..8532da6 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -554,8 +554,7 @@ static int
get_field_flag (PyObject *field, const char *flag_name)
{
int flag_value;
- /* Python 2.4 did not have a 'const' here. */
- PyObject *flag_object = PyObject_GetAttrString (field, (char *) flag_name);
+ PyObject *flag_object = PyObject_GetAttrString (field, flag_name);
if (flag_object == NULL)
return -1;