aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 13:24:00 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:07 -0700
commitcbe793af8831a7244de326d6b07c60c197f096a2 (patch)
treeebdab02eb11031a7b713952444ea5a7257a523d6 /gdb/valops.c
parentf29de665046c1b1a2feabf8d3d584b3b89699e10 (diff)
downloadbinutils-cbe793af8831a7244de326d6b07c60c197f096a2.zip
binutils-cbe793af8831a7244de326d6b07c60c197f096a2.tar.gz
binutils-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/valops.c')
-rw-r--r--gdb/valops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index cea9d3c..5e6095d 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -4079,7 +4079,7 @@ value_slice (struct value *array, int lowbound, int length)
slice_type->set_code (array_type->code ());
if (VALUE_LVAL (array) == lval_memory && array->lazy ())
- slice = allocate_value_lazy (slice_type);
+ slice = value::allocate_lazy (slice_type);
else
{
slice = allocate_value (slice_type);