Remove unused value_object attribute `owned_by_gdb'.
authorThiago Jung Bauermann <bauerman@br.ibm.com>
Sun, 29 Mar 2009 21:19:40 +0000 (21:19 +0000)
committerThiago Jung Bauermann <bauerman@br.ibm.com>
Sun, 29 Mar 2009 21:19:40 +0000 (21:19 +0000)
* 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.

gdb/ChangeLog
gdb/python/python-value.c

index 78db0790e853fc25c988540e9d1d596579185d73..898ec5453ca0430a3356bfdd4eaa065c06e5ab4d 100644 (file)
@@ -1,3 +1,12 @@
+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.
index 49b884f63922aaff773f37ec5c7d46e9617fdc72..5faa281843bd5f8800df26cf115d4956744ab106 100644 (file)
@@ -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);