summaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 3b75cdaae00..cb3346caad9 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -422,7 +422,7 @@ valpy_get_dynamic_type (PyObject *self, void *closure)
type = check_typedef (type);
if (type->is_pointer_or_reference ()
- && (TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_STRUCT))
+ && (type->target_type ()->code () == TYPE_CODE_STRUCT))
{
struct value *target;
int was_pointer = type->code () == TYPE_CODE_PTR;
@@ -525,7 +525,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
length = array_length;
else if (array_length == -1)
{
- type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
+ type = lookup_array_range_type (realtype->target_type (),
0, length - 1);
}
else if (length != array_length)
@@ -534,7 +534,7 @@ valpy_lazy_string (PyObject *self, PyObject *args, PyObject *kw)
specified length. */
if (length > array_length)
error (_("Length is larger than array size."));
- type = lookup_array_range_type (TYPE_TARGET_TYPE (realtype),
+ type = lookup_array_range_type (realtype->target_type (),
low_bound,
low_bound + length - 1);
}
@@ -886,7 +886,7 @@ value_has_field (struct value *v, PyObject *field)
val_type = value_type (v);
val_type = check_typedef (val_type);
if (val_type->is_pointer_or_reference ())
- val_type = check_typedef (TYPE_TARGET_TYPE (val_type));
+ val_type = check_typedef (val_type->target_type ());
type_code = val_type->code ();
if ((type_code == TYPE_CODE_STRUCT || type_code == TYPE_CODE_UNION)
@@ -1274,7 +1274,7 @@ enum valpy_opcode
/* If TYPE is a reference, return the target; otherwise return TYPE. */
#define STRIP_REFERENCE(TYPE) \
- (TYPE_IS_REFERENCE (TYPE) ? (TYPE_TARGET_TYPE (TYPE)) : (TYPE))
+ (TYPE_IS_REFERENCE (TYPE) ? ((TYPE)->target_type ()) : (TYPE))
/* Helper for valpy_binop. Returns a value object which is the result
of applying the operation specified by OPCODE to the given