Make internalvar_name return a const char *

This changes internalvar_name to return a const char *.

gdb/ChangeLog
2020-11-10  Tom Tromey  <tom@tromey.com>

	* value.h (internalvar_name): Update.
	* value.c (internalvar_name): Make return type const.
This commit is contained in:
Tom Tromey 2020-11-10 15:46:17 -07:00
parent caaece0e2f
commit baf20f7627
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2020-11-10 Tom Tromey <tom@tromey.com>
* value.h (internalvar_name): Update.
* value.c (internalvar_name): Make return type const.
2020-11-10 Tom Tromey <tom@tromey.com>
* ax-gdb.c (gen_struct_elt_for_reference, gen_namespace_elt)

View File

@ -2379,7 +2379,7 @@ clear_internalvar (struct internalvar *var)
var->kind = INTERNALVAR_VOID;
}
char *
const char *
internalvar_name (const struct internalvar *var)
{
return var->name;

View File

@ -1122,7 +1122,7 @@ extern void print_variable_and_value (const char *name,
extern void typedef_print (struct type *type, struct symbol *news,
struct ui_file *stream);
extern char *internalvar_name (const struct internalvar *var);
extern const char *internalvar_name (const struct internalvar *var);
extern void preserve_values (struct objfile *);