Add is_pointer convenience function.

This commit is contained in:
Bill Currie 2012-12-18 21:19:17 +09:00
parent 64c98bd4c3
commit 7cb2e40bce
2 changed files with 9 additions and 0 deletions

View file

@ -154,6 +154,7 @@ int is_integral (const type_t *type);
int is_float (const type_t *type);
int is_scalar (const type_t *type);
int is_math (const type_t *type);
int is_pointer (const type_t *type);
int is_struct (const type_t *type);
int is_class (const type_t *type);
int is_array (const type_t *type);

View file

@ -696,6 +696,14 @@ is_struct (const type_t *type)
return 0;
}
int
is_pointer (const type_t *type)
{
if (type->type == ev_pointer)
return 1;
return 0;
}
int
is_class (const type_t *type)
{