Remove a static buffer from cp-name-parser.y

This removes a static buffer from cp-name-parser.y by replacing the
fixed-sized buffer with a std::string out parameter.

gdb/ChangeLog
2018-06-01  Tom Tromey  <tom@tromey.com>

	* python/py-type.c (typy_legacy_template_argument): Update.
	* cp-support.h (cp_demangled_name_to_comp): Update.
	* cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
	parameter to be a "std::string *".
	(main): Update.
This commit is contained in:
Tom Tromey 2018-05-23 21:05:52 -06:00
parent e9cb46ab59
commit 3513a6bb20
4 changed files with 20 additions and 16 deletions

View file

@ -169,7 +169,7 @@ struct type *cp_find_type_baseclass_by_name (struct type *parent_type,
/* Functions from cp-name-parser.y. */
extern std::unique_ptr<demangle_parse_info> cp_demangled_name_to_comp
(const char *demangled_name, const char **errmsg);
(const char *demangled_name, std::string *errmsg);
extern gdb::unique_xmalloc_ptr<char> cp_comp_to_string
(struct demangle_component *result, int estimated_len);