Constify 'la_name' in struct language_defn
Hi, When I add another name of language, I find field 'la_name' can be 'const char *'. This patch is to constify it. gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * language.c (language_str): Return const char *. (add_language): Add const to 'language_names' * language.h (struct language_defn) <la_name>: Add const. (language_str: Update declaration.
This commit is contained in:
parent
01e48c0ce1
commit
27cd387b7c
3 changed files with 11 additions and 4 deletions
|
@ -485,7 +485,7 @@ language_def (enum language lang)
|
|||
}
|
||||
|
||||
/* Return the language as a string. */
|
||||
char *
|
||||
const char *
|
||||
language_str (enum language lang)
|
||||
{
|
||||
int i;
|
||||
|
@ -520,7 +520,7 @@ void
|
|||
add_language (const struct language_defn *lang)
|
||||
{
|
||||
/* For the "set language" command. */
|
||||
static char **language_names = NULL;
|
||||
static const char **language_names = NULL;
|
||||
/* For the "help set language" command. */
|
||||
char *language_set_doc = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue