ZeekArgs: Helper for empty arguments

This commit is contained in:
Arne Welzel 2023-06-06 12:38:20 +02:00
parent 743658248e
commit a25b1a9d59
2 changed files with 13 additions and 0 deletions

View file

@ -52,4 +52,10 @@ VectorValPtr MakeCallArgumentVector(const Args& vals, const RecordTypePtr& types
return rval; return rval;
} }
VectorValPtr MakeEmptyCallArgumentVector()
{
static auto call_argument_vector = id::find_type<VectorType>("call_argument_vector");
return make_intrusive<VectorVal>(call_argument_vector);
}
} // namespace zeek } // namespace zeek

View file

@ -39,4 +39,11 @@ Args val_list_to_args(const ValPList& vl);
*/ */
VectorValPtr MakeCallArgumentVector(const Args& vals, const RecordTypePtr& types); VectorValPtr MakeCallArgumentVector(const Args& vals, const RecordTypePtr& types);
/**
* Creates an empty "call_argument_vector" vector.
*
* @return empty vector of script-level type "call_argument_vector"
*/
VectorValPtr MakeEmptyCallArgumentVector();
} // namespace zeek } // namespace zeek