Constify value_string
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.
This commit is contained in:
parent
79f338988c
commit
7cc3f8e23b
@ -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>
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user