mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 18:32:32 +08:00
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:
@ -859,7 +859,7 @@ typy_legacy_template_argument (struct type *type, const struct block *block,
|
||||
int i;
|
||||
struct demangle_component *demangled;
|
||||
std::unique_ptr<demangle_parse_info> info;
|
||||
const char *err;
|
||||
std::string err;
|
||||
struct type *argtype;
|
||||
|
||||
if (TYPE_NAME (type) == NULL)
|
||||
@ -881,7 +881,7 @@ typy_legacy_template_argument (struct type *type, const struct block *block,
|
||||
|
||||
if (! info)
|
||||
{
|
||||
PyErr_SetString (PyExc_RuntimeError, err);
|
||||
PyErr_SetString (PyExc_RuntimeError, err.c_str ());
|
||||
return NULL;
|
||||
}
|
||||
demangled = info->tree;
|
||||
|
Reference in New Issue
Block a user