From 5c4258f4c051a31d7209712ecd28830c55a92034 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 9 Oct 2020 08:27:30 -0600 Subject: Return std::string from ada_encode This changes ada_encode to return a std::string. This simplifies it somewhat, removes a use of GROW_VECT, and is also simpler for callers to use. gdb/ChangeLog 2020-10-09 Tom Tromey * ada-lang.h (ada_encode): Return std::string. * ada-lang.c (ada_encode_1): Return std::string. (ada_encode): Likewise. (type_from_tag, ada_lookup_name_info::ada_lookup_name_info): Update. * ada-exp.y (block_lookup, write_var_or_type): Update. --- gdb/ada-lang.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/ada-lang.h') diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index ae313ce..9331926 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -318,7 +318,7 @@ extern struct type *ada_get_base_type (struct type *); extern struct type *ada_check_typedef (struct type *); -extern char *ada_encode (const char *); +extern std::string ada_encode (const char *); extern const char *ada_enum_name (const char *); -- cgit v1.1