fieldno++;
/* Skip static fields. */
- while (fieldno < TYPE_NFIELDS (struct_type)
- && field_is_static (&TYPE_FIELD (struct_type,
- fieldno)))
+ while (fieldno < struct_type->num_fields ()
+ && field_is_static (&struct_type->field (fieldno)))
fieldno++;
- if (fieldno >= TYPE_NFIELDS (struct_type))
+ if (fieldno >= struct_type->num_fields ())
error (_("too many initializers"));
field_type = TYPE_FIELD_TYPE (struct_type, fieldno);
if (field_type->code () == TYPE_CODE_UNION
neither an objfile nor a gdbarch. As a result we must manually
allocate memory for auxiliary fields, and free the memory ourselves
when we are done with it. */
- TYPE_NFIELDS (type) = num_types;
- TYPE_FIELDS (type) = (struct field *)
- xzalloc (sizeof (struct field) * num_types);
+ type->set_num_fields (num_types);
+ type->set_fields
+ ((struct field *) xzalloc (sizeof (struct field) * num_types));
while (num_types-- > 0)
TYPE_FIELD_TYPE (type, num_types) = param_types[num_types];
fake_method::~fake_method ()
{
- xfree (TYPE_FIELDS (&m_type));
+ xfree (m_type.fields ());
}
/* Helper for evaluating an OP_VAR_VALUE. */
type = TYPE_TARGET_TYPE (type);
if (type && type->code () == TYPE_CODE_FUNC)
{
- for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
+ for (; tem <= nargs && tem <= type->num_fields (); tem++)
{
argvec[tem] = evaluate_subexp (TYPE_FIELD_TYPE (type,
tem - 1),