Commit e6d585a6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

widl: Move is_void(), is_declptr() and is_conformant_array() to header.h and make them inline.

parent ed960787
......@@ -109,16 +109,6 @@ unsigned int get_attrv(const attr_list_t *list, enum attr_type t)
return 0;
}
int is_void(const type_t *t)
{
return type_get_type(t) == TYPE_VOID;
}
int is_conformant_array(const type_t *t)
{
return is_array(t) && type_array_has_conformance(t);
}
static void write_guid(FILE *f, const char *guid_prefix, const char *name, const UUID *uuid)
{
if (!uuid) return;
......
......@@ -28,9 +28,6 @@ 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 int get_attrv(const attr_list_t *list, enum attr_type t);
extern int is_void(const type_t *t);
extern int is_conformant_array(const type_t *t);
extern int is_declptr(const type_t *t);
extern const char* get_name(const var_t *v);
extern void write_type_left(FILE *h, type_t *t, int declonly);
extern void write_type_right(FILE *h, type_t *t, int is_field);
......@@ -68,6 +65,21 @@ static inline int is_array(const type_t *t)
return type_get_type(t) == TYPE_ARRAY;
}
static inline int is_void(const type_t *t)
{
return type_get_type(t) == TYPE_VOID;
}
static inline int is_declptr(const type_t *t)
{
return is_ptr(t) || (type_get_type(t) == TYPE_ARRAY && type_array_is_decl_as_ptr(t));
}
static inline int is_conformant_array(const type_t *t)
{
return is_array(t) && type_array_has_conformance(t);
}
static inline int last_ptr(const type_t *type)
{
return is_ptr(type) && !is_declptr(type_pointer_get_ref(type));
......
......@@ -2774,11 +2774,6 @@ static void write_pointer_description(FILE *file, type_t *type,
&offset_in_memory, &offset_in_buffer, typestring_offset);
}
int is_declptr(const type_t *t)
{
return is_ptr(t) || (type_get_type(t) == TYPE_ARRAY && type_array_is_decl_as_ptr(t));
}
static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs,
type_t *type, enum type_context context,
const char *name, unsigned int *typestring_offset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment