Change varobj_item::value to a value_ref_ptr
This changes varobj_item::value to be a value_ref_ptr, removing some manual management. gdb/ChangeLog 2020-12-11 Tom Tromey <tom@tromey.com> * varobj.c (install_dynamic_child, varobj_clear_saved_item) (update_dynamic_varobj_children, create_child) (create_child_with_value): Update. * varobj-iter.h (struct varobj_item) <value>: Now a value_ref_ptr. * python/py-varobj.c (py_varobj_iter::next): Call release_value.
This commit is contained in:
parent
24fd95b4cd
commit
1110649507
4 changed files with 19 additions and 18 deletions
|
@ -111,7 +111,7 @@ py_varobj_iter::next ()
|
|||
}
|
||||
|
||||
vitem = new varobj_item ();
|
||||
vitem->value = convert_value_from_python (py_v);
|
||||
vitem->value = release_value (convert_value_from_python (py_v));
|
||||
if (vitem->value == NULL)
|
||||
gdbpy_print_stack ();
|
||||
vitem->name = name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue