aboutsummaryrefslogtreecommitdiff
path: root/gdb/varobj.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-08-13 18:39:20 +0000
committerTom Tromey <tromey@redhat.com>2009-08-13 18:39:20 +0000
commit4e7a5ef5a84e2f120a52def047ef671f8dbd7954 (patch)
tree4725f0f358a5993278ac1bde5d391739ae6740d4 /gdb/varobj.c
parentecd0ada520284724373d81f3580cf1e15855b737 (diff)
downloadgdb-4e7a5ef5a84e2f120a52def047ef671f8dbd7954.zip
gdb-4e7a5ef5a84e2f120a52def047ef671f8dbd7954.tar.gz
gdb-4e7a5ef5a84e2f120a52def047ef671f8dbd7954.tar.bz2
* varobj.c (update_dynamic_varobj_children): Don't use
value_copy. * value.h: (preserve_one_value): Declare. (value_prepend_to_list, value_remove_from_list): Remove. * value.c (preserve_one_value): No longer static. (preserve_values): Call preserve_python_values. (value_prepend_to_list): Remove. (value_remove_from_list): Remove. * python/python.h (values_in_python): Don't declare. (preserve_python_values): Declare. * python/python-value.c (values_in_python): Change type. Move lower. Now static. (struct value_object): Add struct tag. <next, prev>: New fields. (valpy_dealloc): Update. (note_value): New function. (valpy_new): Use value_incref, note_value. (preserve_python_values): New function. (valpy_positive): Don't use value_copy. (value_to_value_object): Use value_incref, note_value. (convert_value_from_python): Update comment.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r--gdb/varobj.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 4a94988..48d4cfb 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -899,16 +899,7 @@ update_dynamic_varobj_children (struct varobj *var,
if (!PyArg_ParseTuple (item, "sO", &name, &py_v))
error (_("Invalid item from the child list"));
- if (PyObject_TypeCheck (py_v, &value_object_type))
- {
- /* If we just call convert_value_from_python for this type,
- we won't know who owns the result. For this one case we
- need to copy the resulting value. */
- v = value_object_to_value (py_v);
- v = value_copy (v);
- }
- else
- v = convert_value_from_python (py_v);
+ v = convert_value_from_python (py_v);
/* TODO: This assume the name of the i-th child never changes. */