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:
Simon Marchi 2015-11-18 11:20:22 -05:00
parent 79f338988c
commit 7cc3f8e23b
3 changed files with 7 additions and 2 deletions

View 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>

View 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;

View 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,