aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-10-26 15:37:15 +0800
committerYao Qi <yao@codesourcery.com>2013-11-07 15:06:50 +0800
commit27cd387b7c3e45685db2f0dae4e9188f562cb7f0 (patch)
tree09823eb45e41bce3370c7367f328c290c3dcb8db /gdb/language.h
parent01e48c0ce157d73db98d73e39e4b2d7c63d0ccdd (diff)
downloadgdb-27cd387b7c3e45685db2f0dae4e9188f562cb7f0.zip
gdb-27cd387b7c3e45685db2f0dae4e9188f562cb7f0.tar.gz
gdb-27cd387b7c3e45685db2f0dae4e9188f562cb7f0.tar.bz2
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.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 5e029ea..14aedb6 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -132,7 +132,7 @@ struct language_defn
{
/* Name of the language. */
- char *la_name;
+ const char *la_name;
/* its symtab language-enum (defs.h). */
@@ -488,7 +488,7 @@ extern enum language language_enum (char *str);
extern const struct language_defn *language_def (enum language);
-extern char *language_str (enum language);
+extern const char *language_str (enum language);
/* Add a language to the set known by GDB (at initialization time). */