diff options
author | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2009-03-29 21:19:40 +0000 |
---|---|---|
committer | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2009-03-29 21:19:40 +0000 |
commit | 77316f4c7e79569cf99020b26d32112aa6916785 (patch) | |
tree | 12191f53240abd836e32d66308500aae3cf70144 | |
parent | c0c6f77785d5f523f929919b66cf90bcd273a9fe (diff) | |
download | fsf-binutils-gdb-77316f4c7e79569cf99020b26d32112aa6916785.zip fsf-binutils-gdb-77316f4c7e79569cf99020b26d32112aa6916785.tar.gz fsf-binutils-gdb-77316f4c7e79569cf99020b26d32112aa6916785.tar.bz2 |
Remove unused value_object attribute `owned_by_gdb'.
* python/python-value.c (value_object): Remove owned_by_gdb
attribute.
(valpy_dealloc): Remove reference to self->owned_by_gdb.
(valpy_new): Likewise.
(value_to_value_object): Likewise.
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/python/python-value.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 78db079..898ec54 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,14 @@ 2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com> + Remove unused value_object attribute `owned_by_gdb'. + * python/python-value.c (value_object): Remove owned_by_gdb + attribute. + (valpy_dealloc): Remove reference to self->owned_by_gdb. + (valpy_new): Likewise. + (value_to_value_object): Likewise. + +2009-03-29 Thiago Jung Bauermann <bauerman@br.ibm.com> + Change gdb.Value.address from a method to an attribute. * python/python-value.c (value_object): Add `address' element. (valpy_dealloc): Decrement reference to self->address if set. diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c index 49b884f..5faa281 100644 --- a/gdb/python/python-value.c +++ b/gdb/python/python-value.c @@ -58,7 +58,6 @@ struct value *values_in_python = NULL; typedef struct { PyObject_HEAD struct value *value; - int owned_by_gdb; PyObject *address; } value_object; @@ -70,8 +69,7 @@ valpy_dealloc (PyObject *obj) value_remove_from_list (&values_in_python, self->value); - if (!self->owned_by_gdb) - value_free (self->value); + value_free (self->value); if (self->address) /* Use braces to appease gcc warning. *sigh* */ @@ -112,7 +110,6 @@ valpy_new (PyTypeObject *subtype, PyObject *args, PyObject *keywords) } value_obj->value = value; - value_obj->owned_by_gdb = 0; value_obj->address = NULL; release_value (value); value_prepend_to_list (&values_in_python, value); @@ -746,7 +743,6 @@ value_to_value_object (struct value *val) if (val_obj != NULL) { val_obj->value = val; - val_obj->owned_by_gdb = 0; val_obj->address = NULL; release_value (val); value_prepend_to_list (&values_in_python, val); |