aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-02-15 22:41:03 -0700
committerTom Tromey <tom@tromey.com>2018-02-21 09:09:45 -0700
commit3eac2b654808f9e233885f910045eea9d2ca0aa0 (patch)
tree22d3276e46df79ab5506979101b94ee6ecdfb12e /gdb/value.h
parent6ccb583f751e020a6db768d517c2dd3ba6d93cc4 (diff)
downloadgdb-3eac2b654808f9e233885f910045eea9d2ca0aa0.zip
gdb-3eac2b654808f9e233885f910045eea9d2ca0aa0.tar.gz
gdb-3eac2b654808f9e233885f910045eea9d2ca0aa0.tar.bz2
Remove a cleanup from parse_expression_for_completion
This removes a cleanup from parse_expression_for_completion, by changing various expression-completion functions to use gdb::unique_xmalloc_ptry rather than explicit malloc+free. Regression tested by the buildbot. gdb/ChangeLog 2018-02-21 Tom Tromey <tom@tromey.com> * value.h: (extract_field_op): Update. * eval.c (extract_field_op): Return a const char *. * expression.h (parse_expression_for_completion): Update. * completer.c (complete_expression): Update. (add_struct_fields): Make fieldname const. * parse.c (expout_completion_name): Now a unique_xmalloc_ptr. (mark_completion_tag, parse_exp_in_context_1): Update. (parse_expression_for_completion): Change "name" to unique_xmalloc_ptr*.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/value.h b/gdb/value.h
index e0ea22d..5676d24 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -889,7 +889,7 @@ extern void fetch_subexp_value (struct expression *exp, int *pc,
struct value **val_chain,
int preserve_errors);
-extern char *extract_field_op (struct expression *exp, int *subexp);
+extern const char *extract_field_op (struct expression *exp, int *subexp);
extern struct value *evaluate_subexp_with_coercion (struct expression *,
int *, enum noside);