diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-08-30 11:49:49 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-30 22:05:57 -0400 |
commit | 33d16dd987d16fe1eb289853e5a444192bb31d9e (patch) | |
tree | 06c5ec20fad9309ab4dace3b6c659fa518d272af /gdb/guile | |
parent | d3fd12dfc52cf4cbb910830e3ff60dca111f7468 (diff) | |
download | gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.zip gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.gz gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.bz2 |
gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros
Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the
call sites to use field::name directly.
Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6
Diffstat (limited to 'gdb/guile')
-rw-r--r-- | gdb/guile/scm-type.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index d65102b..04d3d75 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -999,7 +999,7 @@ gdbscm_type_field (SCM self, SCM field_scm) for (int i = 0; i < type->num_fields (); i++) { - const char *t_field_name = TYPE_FIELD_NAME (type, i); + const char *t_field_name = type->field (i).name (); if (t_field_name && (strcmp_iw (t_field_name, field.get ()) == 0)) { @@ -1041,7 +1041,7 @@ gdbscm_type_has_field_p (SCM self, SCM field_scm) for (int i = 0; i < type->num_fields (); i++) { - const char *t_field_name = TYPE_FIELD_NAME (type, i); + const char *t_field_name = type->field (i).name (); if (t_field_name && (strcmp_iw (t_field_name, field.get ()) == 0)) return SCM_BOOL_T; @@ -1131,8 +1131,8 @@ gdbscm_field_name (SCM self) = tyscm_get_field_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME); struct field *field = tyscm_field_smob_to_field (f_smob); - if (FIELD_NAME (*field)) - return gdbscm_scm_from_c_string (FIELD_NAME (*field)); + if (field->name () != nullptr) + return gdbscm_scm_from_c_string (field->name ()); return SCM_BOOL_F; } |