]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Constify value_string
authorSimon Marchi <simon.marchi@ericsson.com>
Wed, 18 Nov 2015 16:20:22 +0000 (11:20 -0500)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 18 Nov 2015 16:20:22 +0000 (11:20 -0500)
If we constify value_cstring, we might as well constify this one.

gdb/ChangeLog:

* valops.c (value_string): Constify 'ptr' parameter.
* value.h (value_string): Constify 'ptr' parameter.

gdb/ChangeLog
gdb/valops.c
gdb/value.h

index d92ba43e6d3a13f010951ed977f7b81145ab860f..d1b40b8f7a803dd3e11628924d8b7ba583f36c2c 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-18  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * valops.c (value_string): Constify 'ptr' parameter.
+       * value.h (value_string): Constify 'ptr' parameter.
+
 2015-11-18  Simon Marchi  <simon.marchi@ericsson.com>
            Pedro Alves  <palves@redhat.com>
 
index 67e6afe548dd8643d254e269720556b403ab8229..5e5f685c11b18d674da76dc1d29842870be37c25 100644 (file)
@@ -1649,7 +1649,7 @@ value_cstring (const char *ptr, ssize_t len, struct type *char_type)
    string may contain embedded null bytes.  */
 
 struct value *
-value_string (char *ptr, ssize_t len, struct type *char_type)
+value_string (const char *ptr, ssize_t len, struct type *char_type)
 {
   struct value *val;
   int lowbound = current_language->string_lower_bound;
index 94a22340dce8276b0d68f571ed89a3cbf32f02bd..eea0e594d59d1e8bc0689569e4bed46a9a1b319d 100644 (file)
@@ -698,7 +698,7 @@ extern void value_free_to_mark (struct value *mark);
 
 extern struct value *value_cstring (const char *ptr, ssize_t len,
                                    struct type *char_type);
-extern struct value *value_string (char *ptr, ssize_t len,
+extern struct value *value_string (const char *ptr, ssize_t len,
                                   struct type *char_type);
 
 extern struct value *value_array (int lowbound, int highbound,