summaryrefslogtreecommitdiff
path: root/gdb/python/py-type.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-07-30 22:43:54 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 10:59:49 -0400
commit27710edb4e588d0360620df424dd7ee7e8cfafee (patch)
treeaf4da9f4c7e032ab6653536f2a991cbe09cee759 /gdb/python/py-type.c
parent8a50fdcefc44c40d5c4b978f19c22ddfbeb29139 (diff)
downloadbinutils-gdb-27710edb4e588d0360620df424dd7ee7e8cfafee.tar.gz
gdb: remove TYPE_TARGET_TYPE
Remove the macro, replace all uses by calls to type::target_type. Change-Id: Ie51d3e1e22f94130176d6abd723255282bb6d1ed
Diffstat (limited to 'gdb/python/py-type.c')
-rw-r--r--gdb/python/py-type.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index d14f9e42853..3d7d2f63d43 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -503,7 +503,7 @@ typy_get_composite (struct type *type)
if (!type->is_pointer_or_reference ())
break;
- type = TYPE_TARGET_TYPE (type);
+ type = type->target_type ();
}
/* If this is not a struct, union, or enum type, raise TypeError
@@ -686,14 +686,14 @@ typy_target (PyObject *self, PyObject *args)
{
struct type *type = ((type_object *) self)->type;
- if (!TYPE_TARGET_TYPE (type))
+ if (!type->target_type ())
{
PyErr_SetString (PyExc_RuntimeError,
_("Type does not have a target."));
return NULL;
}
- return type_to_type_object (TYPE_TARGET_TYPE (type));
+ return type_to_type_object (type->target_type ());
}
/* Return a const-qualified type variant. */
@@ -1007,7 +1007,7 @@ typy_template_argument (PyObject *self, PyObject *args)
{
type = check_typedef (type);
if (TYPE_IS_REFERENCE (type))
- type = check_typedef (TYPE_TARGET_TYPE (type));
+ type = check_typedef (type->target_type ());
}
catch (const gdb_exception &except)
{