diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-22 12:23:53 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-01-22 12:23:53 -0500 |
commit | 344e9841d989cb96316d8d487e004212d4d3090a (patch) | |
tree | d8a7b89648a9463e2acbb0037740bf55149bc5a2 /gdb/python | |
parent | 30625020198359db7462a197380c242d91c07f14 (diff) | |
download | gdb-344e9841d989cb96316d8d487e004212d4d3090a.zip gdb-344e9841d989cb96316d8d487e004212d4d3090a.tar.gz gdb-344e9841d989cb96316d8d487e004212d4d3090a.tar.bz2 |
gdb: remove TYPE_OBJFILE macro
Change all users to use the type::objfile method instead.
gdb/ChangeLog:
* gdbtypes.h (TYPE_OBJFILE): Remove, change all users to use the
type::objfile method instead.
Change-Id: I6b3f580913fb1fb0cf986b176dba8db68e1fabf9
Diffstat (limited to 'gdb/python')
-rw-r--r-- | gdb/python/py-type.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index f05c3bc..878304f 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -418,7 +418,7 @@ static PyObject * typy_get_objfile (PyObject *self, void *closure) { struct type *type = ((type_object *) self)->type; - struct objfile *objfile = TYPE_OBJFILE (type); + struct objfile *objfile = type->objfile (); if (objfile == nullptr) Py_RETURN_NONE; @@ -1098,9 +1098,9 @@ set_type (type_object *obj, struct type *type) { obj->type = type; obj->prev = NULL; - if (type && TYPE_OBJFILE (type)) + if (type != nullptr && type->objfile () != nullptr) { - struct objfile *objfile = TYPE_OBJFILE (type); + struct objfile *objfile = type->objfile (); obj->next = ((type_object *) objfile_data (objfile, typy_objfile_data_key)); @@ -1119,10 +1119,10 @@ typy_dealloc (PyObject *obj) if (type->prev) type->prev->next = type->next; - else if (type->type && TYPE_OBJFILE (type->type)) + else if (type->type != nullptr && type->type->objfile () != nullptr) { /* Must reset head of list. */ - struct objfile *objfile = TYPE_OBJFILE (type->type); + struct objfile *objfile = type->type->objfile (); if (objfile) set_objfile_data (objfile, typy_objfile_data_key, type->next); |