Change pointer_type to a method of struct type
I noticed that pointer_type is declared in language.h and defined in language.c. However, it really has to do with types, so it should have been in gdbtypes.h all along. This patch changes it to be a method on struct type. And, I went through uses of TYPE_IS_REFERENCE and updated many spots to use the new method as well. (I didn't update ones that were in arch-specific code, as I couldn't readily test that.)
This commit is contained in:
parent
0086a91cee
commit
809f3be12c
17 changed files with 44 additions and 60 deletions
|
@ -470,7 +470,7 @@ typy_get_composite (struct type *type)
|
|||
GDB_PY_HANDLE_EXCEPTION (except);
|
||||
}
|
||||
|
||||
if (type->code () != TYPE_CODE_PTR && !TYPE_IS_REFERENCE (type))
|
||||
if (!type->is_pointer_or_reference ())
|
||||
break;
|
||||
type = TYPE_TARGET_TYPE (type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue