mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 10:46:24 +08:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user