diff options
Diffstat (limited to 'gdb/language.c')
-rw-r--r-- | gdb/language.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/language.c b/gdb/language.c index 39faecc..2869d75 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -538,7 +538,6 @@ add_language (const struct language_defn *lang) /* For the "set language" command. */ static const char **language_names = NULL; /* For the "help set language" command. */ - char *language_set_doc = NULL; int i; struct ui_file *tmp_stream; @@ -609,19 +608,17 @@ add_language (const struct language_defn *lang) languages[i]->la_name + 1); } - language_set_doc = ui_file_xstrdup (tmp_stream, NULL); + std::string language_set_doc = ui_file_as_string (tmp_stream); ui_file_delete (tmp_stream); add_setshow_enum_cmd ("language", class_support, (const char **) language_names, &language, - language_set_doc, + language_set_doc.c_str (), _("Show the current source language."), NULL, set_language_command, show_language_command, &setlist, &showlist); - - xfree (language_set_doc); } /* Iterate through all registered languages looking for and calling |