mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[qfcc] Add a type check helper for structural types
ie, struct/union/array. I finally though up a decent name (didn't want to use record as that's a pascal type).
This commit is contained in:
parent
a0d85e33c2
commit
2c9c15f4c8
2 changed files with 7 additions and 0 deletions
|
@ -164,6 +164,7 @@ int is_pointer (const type_t *type) __attribute__((pure));
|
|||
int is_field (const type_t *type) __attribute__((pure));
|
||||
int is_struct (const type_t *type) __attribute__((pure));
|
||||
int is_array (const type_t *type) __attribute__((pure));
|
||||
int is_structural (const type_t *type) __attribute__((pure));
|
||||
int is_func (const type_t *type) __attribute__((pure));
|
||||
int is_string (const type_t *type) __attribute__((pure));
|
||||
int type_compatible (const type_t *dst, const type_t *src) __attribute__((pure));
|
||||
|
|
|
@ -827,6 +827,12 @@ is_func (const type_t *type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
is_structural (const type_t *type)
|
||||
{
|
||||
return is_struct (type) || is_array (type);
|
||||
}
|
||||
|
||||
int
|
||||
is_string (const type_t *type)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue