diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-23 21:05:52 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-06-01 10:46:47 -0600 |
commit | 3513a6bb20ef286e303367d4ef4963b5dab877cb (patch) | |
tree | 7bcda23d6421fa378b8ff0fdd657467a06d649a0 /gdb/python | |
parent | e9cb46ab59ff2ea94a7fd9fa857a084d3a9b8b39 (diff) | |
download | gdb-3513a6bb20ef286e303367d4ef4963b5dab877cb.zip gdb-3513a6bb20ef286e303367d4ef4963b5dab877cb.tar.gz gdb-3513a6bb20ef286e303367d4ef4963b5dab877cb.tar.bz2 |
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.
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-type.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index dd8c0aa..c7cad2e 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -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; |