widl: Use ref_type to simplify some code.

This commit is contained in:
Dan Hipschman 2006-08-11 17:32:47 -07:00 committed by Alexandre Julliard
parent da44bfc02d
commit 06497dd44c
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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