diff options
author | Tom Tromey <tromey@adacore.com> | 2022-05-18 09:55:00 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-06-02 09:04:45 -0600 |
commit | cec000ad603ea768f5c1a6cf032770eb2d468337 (patch) | |
tree | 4826a4c568df34962ef706441b1ff9652e2927a2 /gdb/python | |
parent | ddfc4ef12441bef95ea0bf0a2fb68fe58e24440a (diff) | |
download | gdb-cec000ad603ea768f5c1a6cf032770eb2d468337.zip gdb-cec000ad603ea768f5c1a6cf032770eb2d468337.tar.gz gdb-cec000ad603ea768f5c1a6cf032770eb2d468337.tar.bz2 |
ODR warning for "enum string_repr_result"
"enum string_repr_result" is defined in multiple .c files, causing ODR
warnings. This patch renames the types.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22395
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-prettyprint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index c9bbd72..a25a1b6 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -29,7 +29,7 @@ /* Return type of print_string_repr. */ -enum string_repr_result +enum gdbpy_string_repr_result { /* The string method returned None. */ string_repr_none, @@ -273,7 +273,7 @@ print_stack_unless_memory_error (struct ui_file *stream) /* Helper for gdbpy_apply_val_pretty_printer which calls to_string and formats the result. */ -static enum string_repr_result +static enum gdbpy_string_repr_result print_string_repr (PyObject *printer, const char *hint, struct ui_file *stream, int recurse, const struct value_print_options *options, @@ -281,7 +281,7 @@ print_string_repr (PyObject *printer, const char *hint, struct gdbarch *gdbarch) { struct value *replacement = NULL; - enum string_repr_result result = string_repr_ok; + enum gdbpy_string_repr_result result = string_repr_ok; gdbpy_ref<> py_str = pretty_print_one_value (printer, &replacement); if (py_str != NULL) @@ -572,7 +572,7 @@ gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang, { struct type *type = value_type (value); struct gdbarch *gdbarch = type->arch (); - enum string_repr_result print_result; + enum gdbpy_string_repr_result print_result; if (value_lazy (value)) value_fetch_lazy (value); |