mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
convenience functions to check for aggregate types
This commit is contained in:
parent
743f5cfef6
commit
d9b67edf52
1 changed files with 8 additions and 0 deletions
|
@ -840,6 +840,14 @@ inline bool IsAggr(TypeTag tag)
|
||||||
{
|
{
|
||||||
return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD;
|
return tag == TYPE_VECTOR || tag == TYPE_TABLE || tag == TYPE_RECORD;
|
||||||
}
|
}
|
||||||
|
inline bool IsAggr(const Type* t)
|
||||||
|
{
|
||||||
|
return IsAggr(t->Tag());
|
||||||
|
}
|
||||||
|
inline bool IsAggr(const TypePtr& t)
|
||||||
|
{
|
||||||
|
return IsAggr(t->Tag());
|
||||||
|
}
|
||||||
|
|
||||||
// True if the given type tag corresponds to the error type.
|
// True if the given type tag corresponds to the error type.
|
||||||
inline bool IsErrorType(TypeTag t) { return (t == TYPE_ERROR); }
|
inline bool IsErrorType(TypeTag t) { return (t == TYPE_ERROR); }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue