diff options
Diffstat (limited to 'gdb/objc-lang.c')
-rw-r--r-- | gdb/objc-lang.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 94951fe..c45f406 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -636,14 +636,14 @@ end_msglist(void) } /* - * Function: specialcmp (char *a, char *b) + * Function: specialcmp (const char *a, const char *b) * * Special strcmp: treats ']' and ' ' as end-of-string. * Used for qsorting lists of objc methods (either by class or selector). */ static int -specialcmp (char *a, char *b) +specialcmp (const char *a, const char *b) { while (*a && *a != ' ' && *a != ']' && *b && *b != ' ' && *b != ']') { @@ -668,7 +668,7 @@ specialcmp (char *a, char *b) static int compare_selectors (const void *a, const void *b) { - char *aname, *bname; + const char *aname, *bname; aname = SYMBOL_PRINT_NAME (*(struct symbol **) a); bname = SYMBOL_PRINT_NAME (*(struct symbol **) b); @@ -697,7 +697,7 @@ selectors_info (char *regexp, int from_tty) { struct objfile *objfile; struct minimal_symbol *msymbol; - char *name; + const char *name; char *val; int matches = 0; int maxlen = 0; @@ -762,8 +762,8 @@ selectors_info (char *regexp, int from_tty) } if (regexp == NULL || re_exec(++name) != 0) { - char *mystart = name; - char *myend = (char *) strchr (mystart, ']'); + const char *mystart = name; + const char *myend = strchr (mystart, ']'); if (myend && (myend - mystart > maxlen)) maxlen = myend - mystart; /* Get longest selector. */ @@ -834,7 +834,7 @@ selectors_info (char *regexp, int from_tty) static int compare_classes (const void *a, const void *b) { - char *aname, *bname; + const char *aname, *bname; aname = SYMBOL_PRINT_NAME (*(struct symbol **) a); bname = SYMBOL_PRINT_NAME (*(struct symbol **) b); @@ -859,7 +859,7 @@ classes_info (char *regexp, int from_tty) { struct objfile *objfile; struct minimal_symbol *msymbol; - char *name; + const char *name; char *val; int matches = 0; int maxlen = 0; @@ -901,8 +901,8 @@ classes_info (char *regexp, int from_tty) if (regexp == NULL || re_exec(name+2) != 0) { /* Compute length of classname part. */ - char *mystart = name + 2; - char *myend = (char *) strchr(mystart, ' '); + const char *mystart = name + 2; + const char *myend = strchr (mystart, ' '); if (myend && (myend - mystart > maxlen)) maxlen = myend - mystart; @@ -1119,7 +1119,7 @@ find_methods (char type, const char *class, const char *category, { struct objfile *objfile = NULL; - char *symname = NULL; + const char *symname = NULL; char ntype = '\0'; char *nclass = NULL; |