diff options
author | Tom Tromey <tom@tromey.com> | 2020-12-13 09:51:42 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-12-13 09:51:42 -0700 |
commit | f5756acc153e2605a0468b461ff4f6b0942a68b7 (patch) | |
tree | 8b5bcb0dedcceabcf0fb774201e3acfa7a29aee2 /gdb/eval.c | |
parent | 862fcbd8f02b03cbf37b452e35bff8361d7a0208 (diff) | |
download | gdb-f5756acc153e2605a0468b461ff4f6b0942a68b7.zip gdb-f5756acc153e2605a0468b461ff4f6b0942a68b7.tar.gz gdb-f5756acc153e2605a0468b461ff4f6b0942a68b7.tar.bz2 |
Constify parse_and_eval_type
I noticed that the argumen to parse_and_eval_type could be "const".
This patch implements this change.
I wonder if this could be removed. It's only called via
check_stub_method_group, which seems questionable to me. However, I
didn't look into doing this.
gdb/ChangeLog
2020-12-13 Tom Tromey <tom@tromey.com>
* gdbtypes.c (safe_parse_type): Make argument const.
* value.h (parse_and_eval_type): Make argument const.
* eval.c (parse_and_eval_type): Make argument const.
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3096,7 +3096,7 @@ evaluate_subexp_for_cast (expression *exp, int *pos, /* Parse a type expression in the string [P..P+LENGTH). */ struct type * -parse_and_eval_type (char *p, int length) +parse_and_eval_type (const char *p, int length) { char *tmp = (char *) alloca (length + 4); |