}
}
+int is_aliaschain_attr(const type_t *type, enum attr_type attr)
+{
+ const type_t *t = type;
+ for (;;)
+ {
+ if (is_attr(t->attrs, attr))
+ return 1;
+ else if (t->kind == TKIND_ALIAS)
+ t = t->orig;
+ else return 0;
+ }
+}
+
int is_attr(const attr_list_t *list, enum attr_type t)
{
const attr_t *attr;
#include "widltypes.h"
extern int is_ptrchain_attr(const var_t *var, enum attr_type t);
+extern int is_aliaschain_attr(const type_t *var, enum attr_type t);
extern int is_attr(const attr_list_t *list, enum attr_type t);
extern void *get_attrp(const attr_list_t *list, enum attr_type t);
extern unsigned long get_attrv(const attr_list_t *list, enum attr_type t);
static inline int is_string_type(const attr_list_t *attrs, const type_t *type)
{
- return ((is_attr(attrs, ATTR_STRING) || is_attr(type->attrs, ATTR_STRING))
+ return ((is_attr(attrs, ATTR_STRING) || is_aliaschain_attr(type, ATTR_STRING))
&& (last_ptr(type) || last_array(type)));
}
return type->typestring_offset;
}
- if ((last_ptr(type) || last_array(type)) && is_ptrchain_attr(var, ATTR_STRING))
+ if (is_string_type(var->attrs, type))
return write_string_tfs(file, var->attrs, type, var->name, typeformat_offset, TRUE);
if (is_array(type))