This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 5/5] constify parse_and_eval_long


This constifies parse_and_eval_long.

	* eval.c (parse_and_eval_long): Make 'exp' const.
	* value.h (parse_and_eval_long): Update.
---
 gdb/eval.c  | 2 +-
 gdb/value.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/eval.c b/gdb/eval.c
index f04baee..76551dc 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 d070d56..4e839d3 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,
-- 
1.8.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]