(value_to_value_object): Fetch value if it was lazy.
+2011-10-03 Paul Koning <paul_koning@dell.com>
+
+ * python/py-value.c (valpy_get_address): Use Py_XINCREF.
+ (value_to_value_object): Fetch value if it was lazy.
+
2011-10-02 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup.
val_obj->address = value_to_value_object (res_val);
}
- Py_INCREF (val_obj->address);
+ Py_XINCREF (val_obj->address);
return val_obj->address;
}
value_to_value_object (struct value *val)
{
value_object *val_obj;
+ volatile struct gdb_exception except;
+ TRY_CATCH (except, RETURN_MASK_ALL)
+ {
+ if (value_lazy (val))
+ value_fetch_lazy (val);
+ }
+ GDB_PY_HANDLE_EXCEPTION (except);
+
val_obj = PyObject_New (value_object, &value_object_type);
if (val_obj != NULL)
{