widl: Move is_ptr() and is_array() to header.h and make them inline.

This commit is contained in:
Dmitry Timoshkov 2014-03-19 19:26:18 +09:00 committed by Alexandre Julliard
parent 84e8d18902
commit e809f0bd8c
3 changed files with 10 additions and 13 deletions

View File

@ -58,6 +58,16 @@ extern const var_t *get_func_handle_var( const type_t *iface, const var_t *func,
extern int has_out_arg_or_return(const var_t *func);
extern int is_const_decl(const var_t *var);
static inline int is_ptr(const type_t *t)
{
return type_get_type(t) == TYPE_POINTER;
}
static inline int is_array(const type_t *t)
{
return type_get_type(t) == TYPE_ARRAY;
}
static inline int last_ptr(const type_t *type)
{
return is_ptr(type) && !is_declptr(type_pointer_get_ref(type));

View File

@ -49,16 +49,6 @@
static typelib_t *typelib;
int is_ptr(const type_t *t)
{
return type_get_type(t) == TYPE_POINTER;
}
int is_array(const type_t *t)
{
return type_get_type(t) == TYPE_ARRAY;
}
/* List of oleauto types that should be recognized by name.
* (most of) these seem to be intrinsic types in mktyplib.
* This table MUST be alphabetically sorted on the kw field.

View File

@ -544,9 +544,6 @@ type_t *alloc_type(void);
void set_all_tfswrite(int val);
void clear_all_offsets(void);
int is_ptr(const type_t *t);
int is_array(const type_t *t);
#define tsENUM 1
#define tsSTRUCT 2
#define tsUNION 3