diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 13:24:00 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:07 -0700 |
commit | cbe793af8831a7244de326d6b07c60c197f096a2 (patch) | |
tree | ebdab02eb11031a7b713952444ea5a7257a523d6 /gdb/rust-lang.c | |
parent | f29de665046c1b1a2feabf8d3d584b3b89699e10 (diff) | |
download | fsf-binutils-gdb-cbe793af8831a7244de326d6b07c60c197f096a2.zip fsf-binutils-gdb-cbe793af8831a7244de326d6b07c60c197f096a2.tar.gz fsf-binutils-gdb-cbe793af8831a7244de326d6b07c60c197f096a2.tar.bz2 |
Turn allocate_value_lazy into a static "constructor"
This changes allocate_value_lazy to be a static "constructor" of
struct value.
I considered trying to change value to use ordinary new/delete, but it
seems to me that due to reference counting, we may someday want to
change these static constructors to return value_ref_ptr instead.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r-- | gdb/rust-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index aa15900..8f09536 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -349,7 +349,7 @@ rust_val_print_slice (struct value *val, struct ui_file *stream, int recurse, struct type *elt_type = base->type ()->target_type (); struct type *array_type = lookup_array_range_type (elt_type, 0, llen - 1); - struct value *array = allocate_value_lazy (array_type); + struct value *array = value::allocate_lazy (array_type); VALUE_LVAL (array) = lval_memory; array->set_address (value_as_address (base)); value_fetch_lazy (array); |