widl: Use ref_type to simplify some code.
This commit is contained in:
parent
da44bfc02d
commit
06497dd44c
|
@ -1235,10 +1235,7 @@ static unsigned char get_pointer_type( type_t *type )
|
|||
int t;
|
||||
if (is_attr( type->attrs, ATTR_STRING ))
|
||||
{
|
||||
type_t *t = type;
|
||||
while( t->type == 0 && t->ref )
|
||||
t = t->ref;
|
||||
switch( t->type )
|
||||
switch( ref_type( type ) )
|
||||
{
|
||||
case RPC_FC_CHAR:
|
||||
return RPC_FC_C_CSTRING;
|
||||
|
|
|
@ -165,7 +165,7 @@ static inline int is_base_type(unsigned char type)
|
|||
}
|
||||
}
|
||||
|
||||
static unsigned char ref_type(const type_t *type)
|
||||
unsigned char ref_type(const type_t *type)
|
||||
{
|
||||
while (type_has_ref(type))
|
||||
type = type->ref;
|
||||
|
|
|
@ -297,4 +297,7 @@ struct _typelib_t {
|
|||
importlib_t *importlibs;
|
||||
};
|
||||
|
||||
/* Get the actual type field for a type (chase down typedef references). */
|
||||
unsigned char ref_type(const type_t *type);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue