[qfcc] Add is_handle type check function

This commit is contained in:
Bill Currie 2024-09-10 19:00:09 +09:00
parent c58748d640
commit 5d7a8127c2
2 changed files with 10 additions and 0 deletions

View file

@ -229,6 +229,7 @@ int is_nonscalar (const type_t *type) __attribute__((pure));
int is_matrix (const type_t *type) __attribute__((pure));
int is_math (const type_t *type) __attribute__((pure));
int is_struct (const type_t *type) __attribute__((pure));
int is_handle (const type_t *type) __attribute__((pure));
int is_union (const type_t *type) __attribute__((pure));
int is_array (const type_t *type) __attribute__((pure));
int is_structural (const type_t *type) __attribute__((pure));

View file

@ -1353,6 +1353,15 @@ is_struct (const type_t *type)
return 0;
}
int
is_handle (const type_t *type)
{
type = unalias_type (type);
if (type->type == ev_invalid && type->meta == ty_handle)
return 1;
return 0;
}
int
is_union (const type_t *type)
{