From a1b8c4cc7e0d8ff5b4b7a80ed61be6f7e88e3eb9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 14 May 2013 20:37:57 +0000 Subject: [PATCH] * eval.c (parse_and_eval_long): Make 'exp' const. * value.h (parse_and_eval_long): Update. --- gdb/ChangeLog | 5 +++++ gdb/eval.c | 2 +- gdb/value.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 63962355f95..a620afb8a50 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-14 Tom Tromey + + * eval.c (parse_and_eval_long): Make 'exp' const. + * value.h (parse_and_eval_long): Update. + 2013-05-14 Tom Tromey * ui-file.c (gdb_fopen): Make arguments const. diff --git a/gdb/eval.c b/gdb/eval.c index cf1fda96b6f..539489f95cb 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -91,7 +91,7 @@ parse_and_eval_address (const char *exp) /* Like parse_and_eval_address, but treats the value of the expression as an integer, not an address, returns a LONGEST, not a CORE_ADDR. */ LONGEST -parse_and_eval_long (char *exp) +parse_and_eval_long (const char *exp) { struct expression *expr = parse_expression (exp); LONGEST retval; diff --git a/gdb/value.h b/gdb/value.h index d070d56ba85..4e839d3939f 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -732,7 +732,7 @@ extern struct type *parse_and_eval_type (char *p, int length); extern CORE_ADDR parse_and_eval_address (const char *exp); -extern LONGEST parse_and_eval_long (char *exp); +extern LONGEST parse_and_eval_long (const char *exp); extern void unop_promote (const struct language_defn *language, struct gdbarch *gdbarch, -- 2.30.2