This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] value: Make accessor methods' parameters const-correct
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Fri, 08 Apr 2016 14:24:20 -0400
- Subject: [binutils-gdb] value: Make accessor methods' parameters const-correct
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 4bf7b526bed1c86b1f20b18e642865f446751e06 ***
Author: Martin Galvan <martin.galvan@tallertechnologies.com>
Branch: master
Commit: 4bf7b526bed1c86b1f20b18e642865f446751e06
value: Make accessor methods' parameters const-correct
I did a quick pass over value.c and value.h and made some of the accessor methods'
pass-by-reference parameters const-correct. Besides the obvious benefits, this is
required if we want to use them on values that are already declared as const
(such as the parameters to lval_funcs).
There's probably a lot more stuff that can be made const, here and elsewhere.
gdb/ChangeLog:
2016-04-08 Martin Galvan <martin.galvan@tallertechnologies.com>
* value.c (value_next): Make pass-by-reference parameters const-correct.
(value_parent): Likewise.
(value_enclosing_type): Likewise.
(value_lazy): Likewise.
(value_stack): Likewise.
(value_embedded_offset): Likewise.
(value_pointed_to_offset): Likewise.
(value_raw_address): Likewise.
(deprecated_value_modifiable): Likewise.
(value_free_to_mark): Likewise.
(value_release_to_mark): Likewise.
(internalvar_name): Likewise.
(readjust_indirect_value_type): Likewise.
(value_initialized): Likewise.
* value.h (value_next): Likewise.
(value_parent): Likewise.
(value_enclosing_type): Likewise.
(value_lazy): Likewise.
(value_stack): Likewise.
(value_embedded_offset): Likewise.
(value_pointed_to_offset): Likewise.
(value_raw_address): Likewise.
(deprecated_value_modifiable): Likewise.
(value_free_to_mark): Likewise.
(value_release_to_mark): Likewise.
(internalvar_name): Likewise.
(readjust_indirect_value_type): Likewise.
(value_initialized): Likewise.