mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-08 10:21:40 +00:00
[qfcc] Add is_handle type check function
This commit is contained in:
parent
c58748d640
commit
5d7a8127c2
2 changed files with 10 additions and 0 deletions
|
@ -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));
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue