mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
support for constructing VectorVal's directly from underlying ZVal vectors
This commit is contained in:
parent
fb01f6fdef
commit
e06d988bfd
2 changed files with 10 additions and 2 deletions
10
src/Val.cc
10
src/Val.cc
|
@ -3223,9 +3223,15 @@ ValPtr TypeVal::DoClone(CloneState* state)
|
|||
return {NewRef{}, this};
|
||||
}
|
||||
|
||||
VectorVal::VectorVal(VectorTypePtr t) : Val(t)
|
||||
VectorVal::VectorVal(VectorTypePtr t) :
|
||||
VectorVal(t, new vector<std::optional<ZVal>>())
|
||||
{
|
||||
vector_val = new vector<std::optional<ZVal>>();
|
||||
}
|
||||
|
||||
VectorVal::VectorVal(VectorTypePtr t, std::vector<std::optional<ZVal>>* vals)
|
||||
: Val(t)
|
||||
{
|
||||
vector_val = vals;
|
||||
yield_type = t->Yield();
|
||||
|
||||
auto y_tag = yield_type->Tag();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue