if (type == NULL)
return -1;
- return TYPE_NFIELDS (type);
+ return type->num_fields ();
}
/* Implements boolean evaluation of gdb.Type. Handle this like other
if (type == NULL)
return NULL;
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
{
const char *t_field_name = TYPE_FIELD_NAME (type, i);
if (type == NULL)
return NULL;
- for (i = 0; i < TYPE_NFIELDS (type); i++)
+ for (i = 0; i < type->num_fields (); i++)
{
const char *t_field_name = TYPE_FIELD_NAME (type, i);
typy_iterator_object *iter_obj = (typy_iterator_object *) self;
struct type *type = iter_obj->source->type;
- if (iter_obj->field < TYPE_NFIELDS (type))
+ if (iter_obj->field < type->num_fields ())
{
gdbpy_ref<> result = make_fielditem (type, iter_obj->field,
iter_obj->kind);