Rename types in ZeekList.h to be consistent with the style guide

This commit is contained in:
Tim Wojtulewicz 2020-08-19 16:26:01 -07:00
parent a34e632eef
commit 01ce18894b
37 changed files with 163 additions and 163 deletions

View file

@ -150,7 +150,7 @@ void Attr::AddTag(ODesc* d) const
d->Add(attr_name(Tag())); d->Add(attr_name(Tag()));
} }
Attributes::Attributes(attr_list* a, TypePtr t, bool arg_in_record, bool is_global) Attributes::Attributes(AttrPList* a, TypePtr t, bool arg_in_record, bool is_global)
{ {
attrs_list.resize(a->length()); attrs_list.resize(a->length());
attrs.reserve(a->length()); attrs.reserve(a->length());
@ -537,7 +537,7 @@ void Attributes::CheckAttr(Attr* a)
const auto& table_index_types = the_table->GetIndexTypes(); const auto& table_index_types = the_table->GetIndexTypes();
type_list expected_args(1 + static_cast<int>(table_index_types.size())); TypePList expected_args(1 + static_cast<int>(table_index_types.size()));
expected_args.push_back(type->AsTableType()); expected_args.push_back(type->AsTableType());
for ( const auto& t : table_index_types ) for ( const auto& t : table_index_types )

View file

@ -107,7 +107,7 @@ protected:
class Attributes final : public Obj { class Attributes final : public Obj {
public: public:
[[deprecated("Remove in v4.1. Construct using IntrusivePtrs instead.")]] [[deprecated("Remove in v4.1. Construct using IntrusivePtrs instead.")]]
Attributes(attr_list* a, zeek::TypePtr t, bool in_record, bool is_global); Attributes(AttrPList* a, zeek::TypePtr t, bool in_record, bool is_global);
Attributes(std::vector<AttrPtr> a, zeek::TypePtr t, Attributes(std::vector<AttrPtr> a, zeek::TypePtr t,
bool in_record, bool is_global); bool in_record, bool is_global);
@ -133,7 +133,7 @@ public:
void DescribeReST(ODesc* d, bool shorten = false) const; void DescribeReST(ODesc* d, bool shorten = false) const;
[[deprecated("Remove in v4.1. Use GetAttrs().")]] [[deprecated("Remove in v4.1. Use GetAttrs().")]]
const attr_list* Attrs() const const AttrPList* Attrs() const
{ return &attrs_list; } { return &attrs_list; }
const std::vector<AttrPtr>& GetAttrs() const const std::vector<AttrPtr>& GetAttrs() const
@ -148,7 +148,7 @@ protected:
std::vector<AttrPtr> attrs; std::vector<AttrPtr> attrs;
// Remove in v4.1. This is used by Attrs(), which is deprecated. // Remove in v4.1. This is used by Attrs(), which is deprecated.
attr_list attrs_list; AttrPList attrs_list;
bool in_record; bool in_record;
bool global_var; bool global_var;
}; };

View file

@ -502,7 +502,7 @@ void Connection::Event(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyz
zeek::IntrusivePtr{zeek::AdoptRef{}, v1}); zeek::IntrusivePtr{zeek::AdoptRef{}, v1});
} }
void Connection::ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* a, val_list vl) void Connection::ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* a, ValPList vl)
{ {
auto args = zeek::val_list_to_args(vl); auto args = zeek::val_list_to_args(vl);
@ -515,14 +515,14 @@ void Connection::ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyz
zeek::event_mgr.Enqueue(f, std::move(args), zeek::util::detail::SOURCE_LOCAL, a ? a->GetID() : 0, this); zeek::event_mgr.Enqueue(f, std::move(args), zeek::util::detail::SOURCE_LOCAL, a ? a->GetID() : 0, this);
} }
void Connection::ConnectionEventFast(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* a, val_list vl) void Connection::ConnectionEventFast(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* a, ValPList vl)
{ {
// "this" is passed as a cookie for the event // "this" is passed as a cookie for the event
zeek::event_mgr.Enqueue(f, zeek::val_list_to_args(vl), zeek::util::detail::SOURCE_LOCAL, zeek::event_mgr.Enqueue(f, zeek::val_list_to_args(vl), zeek::util::detail::SOURCE_LOCAL,
a ? a->GetID() : 0, this); a ? a->GetID() : 0, this);
} }
void Connection::ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* a, val_list* vl) void Connection::ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* a, ValPList* vl)
{ {
auto args = zeek::val_list_to_args(*vl); auto args = zeek::val_list_to_args(*vl);
delete vl; delete vl;
@ -572,7 +572,7 @@ void Connection::CancelTimers()
// call RemoveTimer(), which would then modify the list we're just // call RemoveTimer(), which would then modify the list we're just
// traversing. Thus, we first make a copy of the list which we then // traversing. Thus, we first make a copy of the list which we then
// iterate through. // iterate through.
timer_list tmp(timers.length()); TimerPList tmp(timers.length());
std::copy(timers.begin(), timers.end(), std::back_inserter(tmp)); std::copy(timers.begin(), timers.end(), std::back_inserter(tmp));
for ( const auto& timer : tmp ) for ( const auto& timer : tmp )

View file

@ -204,7 +204,7 @@ public:
// arguments used for the event are whatevever is provided in 'vl'. // arguments used for the event are whatevever is provided in 'vl'.
[[deprecated("Remove in v4.1. Use EnqueueEvent() instead.")]] [[deprecated("Remove in v4.1. Use EnqueueEvent() instead.")]]
void ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyzer, void ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyzer,
val_list vl); ValPList vl);
// Same as ConnectionEvent, except taking the event's argument list via a // Same as ConnectionEvent, except taking the event's argument list via a
// pointer instead of by value. This function takes ownership of the // pointer instead of by value. This function takes ownership of the
@ -212,7 +212,7 @@ public:
// of each of its elements. // of each of its elements.
[[deprecated("Remove in v4.1. Use EnqueueEvent() instead.")]] [[deprecated("Remove in v4.1. Use EnqueueEvent() instead.")]]
void ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyzer, void ConnectionEvent(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyzer,
val_list* vl); ValPList* vl);
// Queues an event without first checking if there's any available event // Queues an event without first checking if there's any available event
// handlers (or remote consumes). If it turns out there's actually nothing // handlers (or remote consumes). If it turns out there's actually nothing
@ -224,7 +224,7 @@ public:
// there's no handlers to consume them). // there's no handlers to consume them).
[[deprecated("Remove in v4.1. Use EnqueueEvent() instead.")]] [[deprecated("Remove in v4.1. Use EnqueueEvent() instead.")]]
void ConnectionEventFast(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyzer, void ConnectionEventFast(zeek::EventHandlerPtr f, zeek::analyzer::Analyzer* analyzer,
val_list vl); ValPList vl);
/** /**
* Enqueues an event associated with this connection and given analyzer. * Enqueues an event associated with this connection and given analyzer.
@ -346,7 +346,7 @@ protected:
zeek::detail::ConnIDKey key; zeek::detail::ConnIDKey key;
bool key_valid; bool key_valid;
timer_list timers; TimerPList timers;
zeek::IPAddr orig_addr; zeek::IPAddr orig_addr;
zeek::IPAddr resp_addr; zeek::IPAddr resp_addr;

View file

@ -94,14 +94,14 @@ EventMgr::~EventMgr()
Unref(src_val); Unref(src_val);
} }
void EventMgr::QueueEventFast(const EventHandlerPtr &h, val_list vl, void EventMgr::QueueEventFast(const EventHandlerPtr &h, ValPList vl,
zeek::util::detail::SourceID src, analyzer::ID aid, zeek::detail::TimerMgr* mgr, zeek::util::detail::SourceID src, analyzer::ID aid, zeek::detail::TimerMgr* mgr,
Obj* obj) Obj* obj)
{ {
QueueEvent(new Event(h, zeek::val_list_to_args(vl), src, aid, obj)); QueueEvent(new Event(h, zeek::val_list_to_args(vl), src, aid, obj));
} }
void EventMgr::QueueEvent(const EventHandlerPtr &h, val_list vl, void EventMgr::QueueEvent(const EventHandlerPtr &h, ValPList vl,
zeek::util::detail::SourceID src, analyzer::ID aid, zeek::util::detail::SourceID src, analyzer::ID aid,
zeek::detail::TimerMgr* mgr, Obj* obj) zeek::detail::TimerMgr* mgr, Obj* obj)
{ {
@ -111,7 +111,7 @@ void EventMgr::QueueEvent(const EventHandlerPtr &h, val_list vl,
Enqueue(h, std::move(args), src, aid, obj); Enqueue(h, std::move(args), src, aid, obj);
} }
void EventMgr::QueueEvent(const EventHandlerPtr &h, val_list* vl, void EventMgr::QueueEvent(const EventHandlerPtr &h, ValPList* vl,
zeek::util::detail::SourceID src, analyzer::ID aid, zeek::util::detail::SourceID src, analyzer::ID aid,
zeek::detail::TimerMgr* mgr, Obj* obj) zeek::detail::TimerMgr* mgr, Obj* obj)
{ {

View file

@ -61,7 +61,7 @@ public:
// because it would be a waste of effort to construct all the event // because it would be a waste of effort to construct all the event
// arguments when there's no handlers to consume them). // arguments when there's no handlers to consume them).
[[deprecated("Remove in v4.1. Use Enqueue() instead.")]] [[deprecated("Remove in v4.1. Use Enqueue() instead.")]]
void QueueEventFast(const EventHandlerPtr &h, val_list vl, void QueueEventFast(const EventHandlerPtr &h, ValPList vl,
zeek::util::detail::SourceID src = zeek::util::detail::SOURCE_LOCAL, zeek::analyzer::ID aid = 0, zeek::util::detail::SourceID src = zeek::util::detail::SOURCE_LOCAL, zeek::analyzer::ID aid = 0,
zeek::detail::TimerMgr* mgr = nullptr, zeek::Obj* obj = nullptr); zeek::detail::TimerMgr* mgr = nullptr, zeek::Obj* obj = nullptr);
@ -72,7 +72,7 @@ public:
// QueueEventFast() instead of this function to prevent the redundant // QueueEventFast() instead of this function to prevent the redundant
// existence check. // existence check.
[[deprecated("Remove in v4.1. Use Enqueue() instead.")]] [[deprecated("Remove in v4.1. Use Enqueue() instead.")]]
void QueueEvent(const EventHandlerPtr &h, val_list vl, void QueueEvent(const EventHandlerPtr &h, ValPList vl,
zeek::util::detail::SourceID src = zeek::util::detail::SOURCE_LOCAL, zeek::analyzer::ID aid = 0, zeek::util::detail::SourceID src = zeek::util::detail::SOURCE_LOCAL, zeek::analyzer::ID aid = 0,
zeek::detail::TimerMgr* mgr = nullptr, zeek::Obj* obj = nullptr); zeek::detail::TimerMgr* mgr = nullptr, zeek::Obj* obj = nullptr);
@ -81,7 +81,7 @@ public:
// memory pointed to by 'vl' as well as decrementing the reference count of // memory pointed to by 'vl' as well as decrementing the reference count of
// each of its elements. // each of its elements.
[[deprecated("Remove in v4.1. Use Enqueue() instead.")]] [[deprecated("Remove in v4.1. Use Enqueue() instead.")]]
void QueueEvent(const EventHandlerPtr &h, val_list* vl, void QueueEvent(const EventHandlerPtr &h, ValPList* vl,
zeek::util::detail::SourceID src = zeek::util::detail::SOURCE_LOCAL, zeek::analyzer::ID aid = 0, zeek::util::detail::SourceID src = zeek::util::detail::SOURCE_LOCAL, zeek::analyzer::ID aid = 0,
zeek::detail::TimerMgr* mgr = nullptr, zeek::Obj* obj = nullptr); zeek::detail::TimerMgr* mgr = nullptr, zeek::Obj* obj = nullptr);

View file

@ -3022,7 +3022,7 @@ RecordConstructorExpr::RecordConstructorExpr(ListExprPtr constructor_list)
// Spin through the list, which should be comprised only of // Spin through the list, which should be comprised only of
// record-field-assign expressions, and build up a // record-field-assign expressions, and build up a
// record type to associate with this constructor. // record type to associate with this constructor.
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
type_decl_list* record_types = new type_decl_list(exprs.length()); type_decl_list* record_types = new type_decl_list(exprs.length());
for ( const auto& e : exprs ) for ( const auto& e : exprs )
@ -3130,7 +3130,7 @@ TableConstructorExpr::TableConstructorExpr(ListExprPtr constructor_list,
attrs = zeek::make_intrusive<Attributes>(std::move(*arg_attrs), type, false, false); attrs = zeek::make_intrusive<Attributes>(std::move(*arg_attrs), type, false, false);
const auto& indices = type->AsTableType()->GetIndices()->GetTypes(); const auto& indices = type->AsTableType()->GetIndices()->GetTypes();
const expr_list& cle = op->AsListExpr()->Exprs(); const ExprPList& cle = op->AsListExpr()->Exprs();
// check and promote all index expressions in ctor list // check and promote all index expressions in ctor list
for ( const auto& expr : cle ) for ( const auto& expr : cle )
@ -3143,7 +3143,7 @@ TableConstructorExpr::TableConstructorExpr(ListExprPtr constructor_list,
if ( idx_expr->Tag() != EXPR_LIST ) if ( idx_expr->Tag() != EXPR_LIST )
continue; continue;
expr_list& idx_exprs = idx_expr->AsListExpr()->Exprs(); ExprPList& idx_exprs = idx_expr->AsListExpr()->Exprs();
if ( idx_exprs.length() != static_cast<int>(indices.size()) ) if ( idx_exprs.length() != static_cast<int>(indices.size()) )
continue; continue;
@ -3176,7 +3176,7 @@ ValPtr TableConstructorExpr::Eval(Frame* f) const
return nullptr; return nullptr;
auto aggr = zeek::make_intrusive<zeek::TableVal>(GetType<TableType>(), attrs); auto aggr = zeek::make_intrusive<zeek::TableVal>(GetType<TableType>(), attrs);
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
for ( const auto& expr : exprs ) for ( const auto& expr : exprs )
expr->EvalIntoAggregate(type.get(), aggr.get(), f); expr->EvalIntoAggregate(type.get(), aggr.get(), f);
@ -3196,7 +3196,7 @@ ValPtr TableConstructorExpr::InitVal(const zeek::Type* t, ValPtr aggr) const
auto tval = aggr ? auto tval = aggr ?
TableValPtr{zeek::AdoptRef{}, aggr.release()->AsTableVal()} : TableValPtr{zeek::AdoptRef{}, aggr.release()->AsTableVal()} :
zeek::make_intrusive<zeek::TableVal>(std::move(tt), attrs); zeek::make_intrusive<zeek::TableVal>(std::move(tt), attrs);
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
for ( const auto& expr : exprs ) for ( const auto& expr : exprs )
expr->EvalIntoAggregate(t, tval.get(), nullptr); expr->EvalIntoAggregate(t, tval.get(), nullptr);
@ -3248,7 +3248,7 @@ SetConstructorExpr::SetConstructorExpr(ListExprPtr constructor_list,
attrs = zeek::make_intrusive<Attributes>(std::move(*arg_attrs), type, false, false); attrs = zeek::make_intrusive<Attributes>(std::move(*arg_attrs), type, false, false);
const auto& indices = type->AsTableType()->GetIndices()->GetTypes(); const auto& indices = type->AsTableType()->GetIndices()->GetTypes();
expr_list& cle = op->AsListExpr()->Exprs(); ExprPList& cle = op->AsListExpr()->Exprs();
if ( indices.size() == 1 ) if ( indices.size() == 1 )
{ {
@ -3286,7 +3286,7 @@ ValPtr SetConstructorExpr::Eval(Frame* f) const
auto aggr = zeek::make_intrusive<zeek::TableVal>(IntrusivePtr{zeek::NewRef{}, type->AsTableType()}, auto aggr = zeek::make_intrusive<zeek::TableVal>(IntrusivePtr{zeek::NewRef{}, type->AsTableType()},
attrs); attrs);
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
for ( const auto& expr : exprs ) for ( const auto& expr : exprs )
{ {
@ -3307,7 +3307,7 @@ ValPtr SetConstructorExpr::InitVal(const zeek::Type* t, ValPtr aggr) const
auto tval = aggr ? auto tval = aggr ?
TableValPtr{zeek::AdoptRef{}, aggr.release()->AsTableVal()} : TableValPtr{zeek::AdoptRef{}, aggr.release()->AsTableVal()} :
zeek::make_intrusive<zeek::TableVal>(std::move(tt), attrs); zeek::make_intrusive<zeek::TableVal>(std::move(tt), attrs);
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
for ( const auto& e : exprs ) for ( const auto& e : exprs )
{ {
@ -3379,7 +3379,7 @@ ValPtr VectorConstructorExpr::Eval(Frame* f) const
return nullptr; return nullptr;
auto vec = zeek::make_intrusive<zeek::VectorVal>(GetType<zeek::VectorType>()); auto vec = zeek::make_intrusive<zeek::VectorVal>(GetType<zeek::VectorType>());
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
loop_over_list(exprs, i) loop_over_list(exprs, i)
{ {
@ -3404,7 +3404,7 @@ ValPtr VectorConstructorExpr::InitVal(const zeek::Type* t, ValPtr aggr) const
auto vec = aggr ? auto vec = aggr ?
VectorValPtr{zeek::AdoptRef{}, aggr.release()->AsVectorVal()} : VectorValPtr{zeek::AdoptRef{}, aggr.release()->AsVectorVal()} :
zeek::make_intrusive<zeek::VectorVal>(std::move(vt)); zeek::make_intrusive<zeek::VectorVal>(std::move(vt));
const expr_list& exprs = op->AsListExpr()->Exprs(); const ExprPList& exprs = op->AsListExpr()->Exprs();
loop_over_list(exprs, i) loop_over_list(exprs, i)
{ {
@ -4210,7 +4210,7 @@ void CallExpr::ExprDescribe(ODesc* d) const
} }
LambdaExpr::LambdaExpr(std::unique_ptr<function_ingredients> arg_ing, LambdaExpr::LambdaExpr(std::unique_ptr<function_ingredients> arg_ing,
id_list arg_outer_ids) : Expr(EXPR_LAMBDA) IDPList arg_outer_ids) : Expr(EXPR_LAMBDA)
{ {
ingredients = std::move(arg_ing); ingredients = std::move(arg_ing);
outer_ids = std::move(arg_outer_ids); outer_ids = std::move(arg_outer_ids);
@ -4742,7 +4742,7 @@ TraversalCode ListExpr::Traverse(TraversalCallback* cb) const
RecordAssignExpr::RecordAssignExpr(const ExprPtr& record, RecordAssignExpr::RecordAssignExpr(const ExprPtr& record,
const ExprPtr& init_list, bool is_init) const ExprPtr& init_list, bool is_init)
{ {
const expr_list& inits = init_list->AsListExpr()->Exprs(); const ExprPList& inits = init_list->AsListExpr()->Exprs();
RecordType* lhs = record->GetType()->AsRecordType(); RecordType* lhs = record->GetType()->AsRecordType();
@ -4968,7 +4968,7 @@ ExprPtr check_and_promote_expr(Expr* const e, zeek::Type* t)
bool check_and_promote_exprs(ListExpr* const elements, TypeList* types) bool check_and_promote_exprs(ListExpr* const elements, TypeList* types)
{ {
expr_list& el = elements->Exprs(); ExprPList& el = elements->Exprs();
const auto& tl = types->GetTypes(); const auto& tl = types->GetTypes();
if ( tl.size() == 1 && tl[0]->Tag() == zeek::TYPE_ANY ) if ( tl.size() == 1 && tl[0]->Tag() == zeek::TYPE_ANY )
@ -5003,7 +5003,7 @@ bool check_and_promote_exprs(ListExpr* const elements, TypeList* types)
bool check_and_promote_args(ListExpr* const args, RecordType* types) bool check_and_promote_args(ListExpr* const args, RecordType* types)
{ {
expr_list& el = args->Exprs(); ExprPList& el = args->Exprs();
int ntypes = types->NumFields(); int ntypes = types->NumFields();
// give variadic BIFs automatic pass // give variadic BIFs automatic pass
@ -5012,7 +5012,7 @@ bool check_and_promote_args(ListExpr* const args, RecordType* types)
if ( el.length() < ntypes ) if ( el.length() < ntypes )
{ {
expr_list def_elements; ExprPList def_elements;
// Start from rightmost parameter, work backward to fill in missing // Start from rightmost parameter, work backward to fill in missing
// arguments using &default expressions. // arguments using &default expressions.
@ -5047,7 +5047,7 @@ bool check_and_promote_args(ListExpr* const args, RecordType* types)
bool check_and_promote_exprs_to_type(ListExpr* const elements, zeek::Type* type) bool check_and_promote_exprs_to_type(ListExpr* const elements, zeek::Type* type)
{ {
expr_list& el = elements->Exprs(); ExprPList& el = elements->Exprs();
if ( type->Tag() == zeek::TYPE_ANY ) if ( type->Tag() == zeek::TYPE_ANY )
return true; return true;
@ -5075,7 +5075,7 @@ bool check_and_promote_exprs_to_type(ListExpr* const elements, zeek::Type* type)
std::optional<std::vector<ValPtr>> eval_list(Frame* f, const ListExpr* l) std::optional<std::vector<ValPtr>> eval_list(Frame* f, const ListExpr* l)
{ {
const expr_list& e = l->Exprs(); const ExprPList& e = l->Exprs();
auto rval = std::make_optional<std::vector<ValPtr>>(); auto rval = std::make_optional<std::vector<ValPtr>>();
rval->reserve(e.length()); rval->reserve(e.length());

View file

@ -789,7 +789,7 @@ protected:
class LambdaExpr final : public Expr { class LambdaExpr final : public Expr {
public: public:
LambdaExpr(std::unique_ptr<function_ingredients> ingredients, LambdaExpr(std::unique_ptr<function_ingredients> ingredients,
id_list outer_ids); IDPList outer_ids);
ValPtr Eval(Frame* f) const override; ValPtr Eval(Frame* f) const override;
TraversalCode Traverse(TraversalCallback* cb) const override; TraversalCode Traverse(TraversalCallback* cb) const override;
@ -802,7 +802,7 @@ protected:
private: private:
std::unique_ptr<function_ingredients> ingredients; std::unique_ptr<function_ingredients> ingredients;
id_list outer_ids; IDPList outer_ids;
std::string my_name; std::string my_name;
}; };
@ -834,8 +834,8 @@ public:
void Append(ExprPtr e); void Append(ExprPtr e);
const expr_list& Exprs() const { return exprs; } const ExprPList& Exprs() const { return exprs; }
expr_list& Exprs() { return exprs; } ExprPList& Exprs() { return exprs; }
// True if the entire list represents pure values. // True if the entire list represents pure values.
bool IsPure() const override; bool IsPure() const override;
@ -854,7 +854,7 @@ protected:
void ExprDescribe(ODesc* d) const override; void ExprDescribe(ODesc* d) const override;
expr_list exprs; ExprPList exprs;
}; };

View file

@ -213,14 +213,14 @@ void Frame::CloneNonFuncElement(int offset, ScriptFunc* func, Frame* other) cons
other->SetElement(offset, std::move(rval)); other->SetElement(offset, std::move(rval));
} }
Frame* Frame::SelectiveClone(const id_list& selection, ScriptFunc* func) const Frame* Frame::SelectiveClone(const IDPList& selection, ScriptFunc* func) const
{ {
if ( selection.length() == 0 ) if ( selection.length() == 0 )
return nullptr; return nullptr;
id_list us; IDPList us;
// and // and
id_list them; IDPList them;
for ( const auto& we : selection ) for ( const auto& we : selection )
{ {
@ -279,16 +279,16 @@ Frame* Frame::SelectiveClone(const id_list& selection, ScriptFunc* func) const
return other; return other;
} }
broker::expected<broker::data> Frame::Serialize(const Frame* target, const id_list& selection) broker::expected<broker::data> Frame::Serialize(const Frame* target, const IDPList& selection)
{ {
broker::vector rval; broker::vector rval;
if ( selection.length() == 0 ) if ( selection.length() == 0 )
return {std::move(rval)}; return {std::move(rval)};
id_list us; IDPList us;
// and // and
id_list them; IDPList them;
std::unordered_map<std::string, int> new_map; std::unordered_map<std::string, int> new_map;
if ( target->offset_map ) if ( target->offset_map )
@ -368,7 +368,7 @@ std::pair<bool, FramePtr> Frame::Unserialize(const broker::vector& data)
if ( data.size() == 0 ) if ( data.size() == 0 )
return std::make_pair(true, nullptr); return std::make_pair(true, nullptr);
id_list outer_ids; IDPList outer_ids;
OffsetMap offset_map; OffsetMap offset_map;
FramePtr closure; FramePtr closure;
@ -487,7 +487,7 @@ std::pair<bool, FramePtr> Frame::Unserialize(const broker::vector& data)
return std::make_pair(true, std::move(rf)); return std::make_pair(true, std::move(rf));
} }
void Frame::AddKnownOffsets(const id_list& ids) void Frame::AddKnownOffsets(const IDPList& ids)
{ {
if ( ! offset_map ) if ( ! offset_map )
offset_map = std::make_unique<OffsetMap>(); offset_map = std::make_unique<OffsetMap>();
@ -499,7 +499,7 @@ void Frame::AddKnownOffsets(const id_list& ids)
}); });
} }
void Frame::CaptureClosure(Frame* c, id_list arg_outer_ids) void Frame::CaptureClosure(Frame* c, IDPList arg_outer_ids)
{ {
if ( closure || outer_ids.length() ) if ( closure || outer_ids.length() )
zeek::reporter->InternalError("Attempted to override a closure."); zeek::reporter->InternalError("Attempted to override a closure.");
@ -544,7 +544,7 @@ bool Frame::IsOuterID(const zeek::detail::ID* in) const
[&in](zeek::detail::ID* id)-> bool { return strcmp(id->Name(), in->Name()) == 0; }); [&in](zeek::detail::ID* id)-> bool { return strcmp(id->Name(), in->Name()) == 0; });
} }
broker::expected<broker::data> Frame::SerializeIDList(const id_list& in) broker::expected<broker::data> Frame::SerializeIDList(const IDPList& in)
{ {
broker::vector rval; broker::vector rval;
@ -571,10 +571,10 @@ Frame::SerializeOffsetMap(const std::unordered_map<std::string, int>& in)
return {std::move(rval)}; return {std::move(rval)};
} }
std::pair<bool, id_list> std::pair<bool, IDPList>
Frame::UnserializeIDList(const broker::vector& data) Frame::UnserializeIDList(const broker::vector& data)
{ {
id_list rval; IDPList rval;
if ( data.size() % 2 != 0 ) if ( data.size() % 2 != 0 )
return std::make_pair(false, std::move(rval)); return std::make_pair(false, std::move(rval));
@ -587,7 +587,7 @@ Frame::UnserializeIDList(const broker::vector& data)
for ( auto& i : rval ) for ( auto& i : rval )
Unref(i); Unref(i);
rval = id_list{}; rval = IDPList{};
return std::make_pair(false, std::move(rval)); return std::make_pair(false, std::move(rval));
} }
@ -599,7 +599,7 @@ Frame::UnserializeIDList(const broker::vector& data)
for ( auto& i : rval ) for ( auto& i : rval )
Unref(i); Unref(i);
rval = id_list{}; rval = IDPList{};
return std::make_pair(false, std::move(rval)); return std::make_pair(false, std::move(rval));
} }

View file

@ -175,7 +175,7 @@ public:
* *selection* have been cloned. All other values are made to be * *selection* have been cloned. All other values are made to be
* null. * null.
*/ */
Frame* SelectiveClone(const id_list& selection, ScriptFunc* func) const; Frame* SelectiveClone(const IDPList& selection, ScriptFunc* func) const;
/** /**
* Serializes the Frame into a Broker representation. * Serializes the Frame into a Broker representation.
@ -200,7 +200,7 @@ public:
* @return the broker representaton, or an error if the serialization * @return the broker representaton, or an error if the serialization
* failed. * failed.
*/ */
static broker::expected<broker::data> Serialize(const Frame* target, const id_list& selection); static broker::expected<broker::data> Serialize(const Frame* target, const IDPList& selection);
/** /**
* Instantiates a Frame from a serialized one. * Instantiates a Frame from a serialized one.
@ -218,7 +218,7 @@ public:
* *
* @param ids the ids that the frame will intake. * @param ids the ids that the frame will intake.
*/ */
void AddKnownOffsets(const id_list& ids); void AddKnownOffsets(const IDPList& ids);
/** /**
* Captures *c* as this frame's closure and Refs all of the values * Captures *c* as this frame's closure and Refs all of the values
@ -226,7 +226,7 @@ public:
* the frame will unref it upon deconstruction. When calling this, * the frame will unref it upon deconstruction. When calling this,
* the frame's closure must not have been set yet. * the frame's closure must not have been set yet.
*/ */
void CaptureClosure(Frame* c, id_list outer_ids); void CaptureClosure(Frame* c, IDPList outer_ids);
// If the frame is run in the context of a trigger condition evaluation, // If the frame is run in the context of a trigger condition evaluation,
// the trigger needs to be registered. // the trigger needs to be registered.
@ -293,16 +293,16 @@ private:
static broker::expected<broker::data> static broker::expected<broker::data>
SerializeOffsetMap(const OffsetMap& in); SerializeOffsetMap(const OffsetMap& in);
/** Serializes an id_list */ /** Serializes an IDPList */
static broker::expected<broker::data> static broker::expected<broker::data>
SerializeIDList(const id_list& in); SerializeIDList(const IDPList& in);
/** Unserializes an offset map. */ /** Unserializes an offset map. */
static std::pair<bool, std::unordered_map<std::string, int>> static std::pair<bool, std::unordered_map<std::string, int>>
UnserializeOffsetMap(const broker::vector& data); UnserializeOffsetMap(const broker::vector& data);
/** Unserializes an id_list. */ /** Unserializes an IDPList. */
static std::pair<bool, id_list> static std::pair<bool, IDPList>
UnserializeIDList(const broker::vector& data); UnserializeIDList(const broker::vector& data);
/** The number of vals that can be stored in this frame. */ /** The number of vals that can be stored in this frame. */
@ -320,7 +320,7 @@ private:
Frame* closure; Frame* closure;
/** ID's used in this frame from the enclosing frame. */ /** ID's used in this frame from the enclosing frame. */
id_list outer_ids; IDPList outer_ids;
/** /**
* Maps ID names to offsets. Used if this frame is serialized * Maps ID names to offsets. Used if this frame is serialized

View file

@ -286,7 +286,7 @@ void Func::CheckPluginResult(bool handled, const zeek::ValPtr& hook_result,
} }
} }
zeek::Val* Func::Call(val_list* args, zeek::detail::Frame* parent) const zeek::Val* Func::Call(ValPList* args, zeek::detail::Frame* parent) const
{ {
auto zargs = zeek::val_list_to_args(*args); auto zargs = zeek::val_list_to_args(*args);
return Invoke(&zargs, parent).release(); return Invoke(&zargs, parent).release();
@ -498,7 +498,7 @@ void ScriptFunc::AddBody(zeek::detail::StmtPtr new_body,
sort(bodies.begin(), bodies.end()); sort(bodies.begin(), bodies.end());
} }
void ScriptFunc::AddClosure(id_list ids, zeek::detail::Frame* f) void ScriptFunc::AddClosure(IDPList ids, zeek::detail::Frame* f)
{ {
if ( ! f ) if ( ! f )
return; return;
@ -689,7 +689,7 @@ bool check_built_in_call(BuiltinFunc* f, zeek::detail::CallExpr* call)
if ( f->TheFunc() != zeek::BifFunc::fmt_bif) if ( f->TheFunc() != zeek::BifFunc::fmt_bif)
return true; return true;
const expr_list& args = call->Args()->Exprs(); const ExprPList& args = call->Args()->Exprs();
if ( args.length() == 0 ) if ( args.length() == 0 )
{ {
// Empty calls are allowed, since you can't just // Empty calls are allowed, since you can't just

View file

@ -72,7 +72,7 @@ public:
bool HasBodies() const { return bodies.size(); } bool HasBodies() const { return bodies.size(); }
[[deprecated("Remove in v4.1. Use Invoke() instead.")]] [[deprecated("Remove in v4.1. Use Invoke() instead.")]]
zeek::Val* Call(val_list* args, zeek::detail::Frame* parent = nullptr) const; zeek::Val* Call(ValPList* args, zeek::detail::Frame* parent = nullptr) const;
/** /**
* Calls a Zeek function. * Calls a Zeek function.
@ -165,7 +165,7 @@ public:
* @param ids IDs that are captured by the closure. * @param ids IDs that are captured by the closure.
* @param f the closure to be captured. * @param f the closure to be captured.
*/ */
void AddClosure(id_list ids, zeek::detail::Frame* f); void AddClosure(IDPList ids, zeek::detail::Frame* f);
/** /**
* Replaces the current closure with one built from *data* * Replaces the current closure with one built from *data*
@ -192,7 +192,7 @@ public:
size_t new_frame_size, int priority) override; size_t new_frame_size, int priority) override;
/** Sets this function's outer_id list. */ /** Sets this function's outer_id list. */
void SetOuterIDs(id_list ids) void SetOuterIDs(IDPList ids)
{ outer_ids = std::move(ids); } { outer_ids = std::move(ids); }
void Describe(ODesc* d) const override; void Describe(ODesc* d) const override;
@ -220,7 +220,7 @@ private:
size_t frame_size; size_t frame_size;
// List of the outer IDs used in the function. // List of the outer IDs used in the function.
id_list outer_ids; IDPList outer_ids;
// The frame the ScriptFunc was initialized in. // The frame the ScriptFunc was initialized in.
zeek::detail::Frame* closure = nullptr; zeek::detail::Frame* closure = nullptr;
bool weak_closure_ref = false; bool weak_closure_ref = false;

View file

@ -235,7 +235,7 @@ void Reporter::Syslog(const char* fmt, ...)
va_end(ap); va_end(ap);
} }
void Reporter::WeirdHelper(EventHandlerPtr event, val_list vl, const char* fmt_name, ...) void Reporter::WeirdHelper(EventHandlerPtr event, ValPList vl, const char* fmt_name, ...)
{ {
va_list ap; va_list ap;
va_start(ap, fmt_name); va_start(ap, fmt_name);
@ -453,7 +453,7 @@ void Reporter::Weird(const zeek::IPAddr& orig, const zeek::IPAddr& resp, const c
} }
void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out, void Reporter::DoLog(const char* prefix, EventHandlerPtr event, FILE* out,
Connection* conn, val_list* addl, bool location, bool time, Connection* conn, ValPList* addl, bool location, bool time,
const char* postfix, const char* fmt, va_list ap) const char* postfix, const char* fmt, va_list ap)
{ {
static char tmp[512]; static char tmp[512];

View file

@ -260,12 +260,12 @@ public:
private: private:
void DoLog(const char* prefix, zeek::EventHandlerPtr event, FILE* out, void DoLog(const char* prefix, zeek::EventHandlerPtr event, FILE* out,
Connection* conn, val_list* addl, bool location, bool time, Connection* conn, ValPList* addl, bool location, bool time,
const char* postfix, const char* fmt, va_list ap) __attribute__((format(printf, 10, 0))); const char* postfix, const char* fmt, va_list ap) __attribute__((format(printf, 10, 0)));
// WeirdHelper doesn't really have to be variadic, but it calls DoLog // WeirdHelper doesn't really have to be variadic, but it calls DoLog
// and that takes va_list anyway. // and that takes va_list anyway.
void WeirdHelper(zeek::EventHandlerPtr event, val_list vl, const char* fmt_name, ...) __attribute__((format(printf, 4, 5)));; void WeirdHelper(zeek::EventHandlerPtr event, ValPList vl, const char* fmt_name, ...) __attribute__((format(printf, 4, 5)));;
void UpdateWeirdStats(const char* name); void UpdateWeirdStats(const char* name);
inline bool WeirdOnSamplingWhiteList(const char* name) inline bool WeirdOnSamplingWhiteList(const char* name)
{ return weird_sampling_whitelist.find(name) != weird_sampling_whitelist.end(); } { return weird_sampling_whitelist.find(name) != weird_sampling_whitelist.end(); }

View file

@ -154,7 +154,7 @@ void Stmt::AccessStats(ODesc* d) const
ExprListStmt::ExprListStmt(StmtTag t, ListExprPtr arg_l) ExprListStmt::ExprListStmt(StmtTag t, ListExprPtr arg_l)
: Stmt(t), l(std::move(arg_l)) : Stmt(t), l(std::move(arg_l))
{ {
const expr_list& e = l->Exprs(); const ExprPList& e = l->Exprs();
for ( const auto& expr : e ) for ( const auto& expr : e )
{ {
const auto& t = expr->GetType(); const auto& t = expr->GetType();
@ -192,7 +192,7 @@ TraversalCode ExprListStmt::Traverse(TraversalCallback* cb) const
TraversalCode tc = cb->PreStmt(this); TraversalCode tc = cb->PreStmt(this);
HANDLE_TC_STMT_PRE(tc); HANDLE_TC_STMT_PRE(tc);
const expr_list& e = l->Exprs(); const ExprPList& e = l->Exprs();
for ( const auto& expr : e ) for ( const auto& expr : e )
{ {
tc = expr->Traverse(cb); tc = expr->Traverse(cb);
@ -484,7 +484,7 @@ static StmtTag get_last_stmt_tag(const Stmt* stmt)
return get_last_stmt_tag(stmts->Stmts()[len - 1]); return get_last_stmt_tag(stmts->Stmts()[len - 1]);
} }
Case::Case(ListExprPtr arg_expr_cases, id_list* arg_type_cases, Case::Case(ListExprPtr arg_expr_cases, IDPList* arg_type_cases,
StmtPtr arg_s) StmtPtr arg_s)
: expr_cases(std::move(arg_expr_cases)), type_cases(arg_type_cases), : expr_cases(std::move(arg_expr_cases)), type_cases(arg_type_cases),
s(std::move(arg_s)) s(std::move(arg_s))
@ -525,7 +525,7 @@ void Case::Describe(ODesc* d) const
if ( expr_cases ) if ( expr_cases )
{ {
const expr_list& e = expr_cases->Exprs(); const ExprPList& e = expr_cases->Exprs();
d->AddCount(e.length()); d->AddCount(e.length());
@ -541,7 +541,7 @@ void Case::Describe(ODesc* d) const
if ( type_cases ) if ( type_cases )
{ {
const id_list& t = *type_cases; const IDPList& t = *type_cases;
d->AddCount(t.length()); d->AddCount(t.length());
@ -622,7 +622,7 @@ SwitchStmt::SwitchStmt(ExprPtr index, case_list* arg_cases)
{ {
Case* c = (*cases)[i]; Case* c = (*cases)[i];
ListExpr* le = c->ExprCases(); ListExpr* le = c->ExprCases();
id_list* tl = c->TypeCases(); IDPList* tl = c->TypeCases();
if ( le ) if ( le )
{ {
@ -637,7 +637,7 @@ SwitchStmt::SwitchStmt(ExprPtr index, case_list* arg_cases)
continue; continue;
} }
expr_list& exprs = le->Exprs(); ExprPList& exprs = le->Exprs();
loop_over_list(exprs, j) loop_over_list(exprs, j)
{ {
@ -1081,7 +1081,7 @@ ValPtr WhileStmt::Exec(Frame* f, StmtFlowType& flow) const
return rval; return rval;
} }
ForStmt::ForStmt(id_list* arg_loop_vars, ExprPtr loop_expr) ForStmt::ForStmt(IDPList* arg_loop_vars, ExprPtr loop_expr)
: ExprStmt(STMT_FOR, std::move(loop_expr)) : ExprStmt(STMT_FOR, std::move(loop_expr))
{ {
loop_vars = arg_loop_vars; loop_vars = arg_loop_vars;
@ -1163,7 +1163,7 @@ ForStmt::ForStmt(id_list* arg_loop_vars, ExprPtr loop_expr)
e->Error("target to iterate over must be a table, set, vector, or string"); e->Error("target to iterate over must be a table, set, vector, or string");
} }
ForStmt::ForStmt(id_list* arg_loop_vars, ForStmt::ForStmt(IDPList* arg_loop_vars,
ExprPtr loop_expr, IDPtr val_var) ExprPtr loop_expr, IDPtr val_var)
: ForStmt(arg_loop_vars, std::move(loop_expr)) : ForStmt(arg_loop_vars, std::move(loop_expr))
{ {

View file

@ -155,14 +155,14 @@ protected:
class Case final : public Obj { class Case final : public Obj {
public: public:
Case(ListExprPtr c, id_list* types, StmtPtr arg_s); Case(ListExprPtr c, IDPList* types, StmtPtr arg_s);
~Case() override; ~Case() override;
const ListExpr* ExprCases() const { return expr_cases.get(); } const ListExpr* ExprCases() const { return expr_cases.get(); }
ListExpr* ExprCases() { return expr_cases.get(); } ListExpr* ExprCases() { return expr_cases.get(); }
const id_list* TypeCases() const { return type_cases; } const IDPList* TypeCases() const { return type_cases; }
id_list* TypeCases() { return type_cases; } IDPList* TypeCases() { return type_cases; }
const Stmt* Body() const { return s.get(); } const Stmt* Body() const { return s.get(); }
Stmt* Body() { return s.get(); } Stmt* Body() { return s.get(); }
@ -173,7 +173,7 @@ public:
protected: protected:
ListExprPtr expr_cases; ListExprPtr expr_cases;
id_list* type_cases; IDPList* type_cases;
StmtPtr s; StmtPtr s;
}; };
@ -273,14 +273,14 @@ protected:
class ForStmt final : public ExprStmt { class ForStmt final : public ExprStmt {
public: public:
ForStmt(id_list* loop_vars, ExprPtr loop_expr); ForStmt(IDPList* loop_vars, ExprPtr loop_expr);
// Special constructor for key value for loop. // Special constructor for key value for loop.
ForStmt(id_list* loop_vars, ExprPtr loop_expr, IDPtr val_var); ForStmt(IDPList* loop_vars, ExprPtr loop_expr, IDPtr val_var);
~ForStmt() override; ~ForStmt() override;
void AddBody(StmtPtr arg_body) { body = std::move(arg_body); } void AddBody(StmtPtr arg_body) { body = std::move(arg_body); }
const id_list* LoopVar() const { return loop_vars; } const IDPList* LoopVar() const { return loop_vars; }
const Expr* LoopExpr() const { return e.get(); } const Expr* LoopExpr() const { return e.get(); }
const Stmt* LoopBody() const { return body.get(); } const Stmt* LoopBody() const { return body.get(); }
@ -293,7 +293,7 @@ public:
protected: protected:
ValPtr DoExec(Frame* f, Val* v, StmtFlowType& flow) const override; ValPtr DoExec(Frame* f, Val* v, StmtFlowType& flow) const override;
id_list* loop_vars; IDPList* loop_vars;
StmtPtr body; StmtPtr body;
// Stores the value variable being used for a key value for loop. // Stores the value variable being used for a key value for loop.
// Always set to nullptr unless special constructor is called. // Always set to nullptr unless special constructor is called.
@ -358,8 +358,8 @@ public:
ValPtr Exec(Frame* f, StmtFlowType& flow) const override; ValPtr Exec(Frame* f, StmtFlowType& flow) const override;
const stmt_list& Stmts() const { return stmts; } const StmtPList& Stmts() const { return stmts; }
stmt_list& Stmts() { return stmts; } StmtPList& Stmts() { return stmts; }
void Describe(ODesc* d) const override; void Describe(ODesc* d) const override;
@ -368,7 +368,7 @@ public:
protected: protected:
bool IsPure() const override; bool IsPure() const override;
stmt_list stmts; StmtPList stmts;
}; };
class EventBodyList final : public StmtList { class EventBodyList final : public StmtList {

View file

@ -350,7 +350,7 @@ int IndexType::MatchesIndex(zeek::detail::ListExpr* const index) const
{ {
// If we have a type indexed by subnets, addresses are ok. // If we have a type indexed by subnets, addresses are ok.
const auto& types = indices->GetTypes(); const auto& types = indices->GetTypes();
const expr_list& exprs = index->Exprs(); const ExprPList& exprs = index->Exprs();
if ( types.size() == 1 && types[0]->Tag() == TYPE_SUBNET && if ( types.size() == 1 && types[0]->Tag() == TYPE_SUBNET &&
exprs.length() == 1 && exprs[0]->GetType()->Tag() == TYPE_ADDR ) exprs.length() == 1 && exprs[0]->GetType()->Tag() == TYPE_ADDR )
@ -603,7 +603,7 @@ int FuncType::MatchesIndex(zeek::detail::ListExpr* const index) const
MATCHES_INDEX_SCALAR : DOES_NOT_MATCH_INDEX; MATCHES_INDEX_SCALAR : DOES_NOT_MATCH_INDEX;
} }
bool FuncType::CheckArgs(const type_list* args, bool is_init) const bool FuncType::CheckArgs(const TypePList* args, bool is_init) const
{ {
std::vector<TypePtr> as; std::vector<TypePtr> as;
as.reserve(args->length()); as.reserve(args->length());
@ -1455,7 +1455,7 @@ const TypePtr& VectorType::Yield() const
int VectorType::MatchesIndex(zeek::detail::ListExpr* const index) const int VectorType::MatchesIndex(zeek::detail::ListExpr* const index) const
{ {
expr_list& el = index->Exprs(); ExprPList& el = index->Exprs();
if ( el.length() != 1 && el.length() != 2) if ( el.length() != 1 && el.length() != 2)
return DOES_NOT_MATCH_INDEX; return DOES_NOT_MATCH_INDEX;
@ -2119,7 +2119,7 @@ TypePtr init_type(zeek::detail::Expr* init)
} }
zeek::detail::ListExpr* init_list = init->AsListExpr(); zeek::detail::ListExpr* init_list = init->AsListExpr();
const expr_list& el = init_list->Exprs(); const ExprPList& el = init_list->Exprs();
if ( el.length() == 0 ) if ( el.length() == 0 )
{ {

View file

@ -305,7 +305,7 @@ public:
~TypeList() override = default; ~TypeList() override = default;
[[deprecated("Remove in v4.1. Use GetTypes() instead.")]] [[deprecated("Remove in v4.1. Use GetTypes() instead.")]]
const type_list* Types() const const TypePList* Types() const
{ return &types_list; } { return &types_list; }
const std::vector<TypePtr>& GetTypes() const const std::vector<TypePtr>& GetTypes() const
@ -342,7 +342,7 @@ protected:
std::vector<TypePtr> types; std::vector<TypePtr> types;
// Remove in v4.1. This is used by Types(), which is deprecated. // Remove in v4.1. This is used by Types(), which is deprecated.
type_list types_list; TypePList types_list;
}; };
class IndexType : public Type { class IndexType : public Type {
@ -357,7 +357,7 @@ public:
TypeList* Indices() const { return indices.get(); } TypeList* Indices() const { return indices.get(); }
[[deprecated("Remove in v4.1. Use GetIndexTypes().")]] [[deprecated("Remove in v4.1. Use GetIndexTypes().")]]
const type_list* IndexTypes() const const TypePList* IndexTypes() const
{ {
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@ -462,7 +462,7 @@ public:
{ yield = nullptr; flavor = arg_flav; } { yield = nullptr; flavor = arg_flav; }
int MatchesIndex(zeek::detail::ListExpr* index) const override; int MatchesIndex(zeek::detail::ListExpr* index) const override;
bool CheckArgs(const type_list* args, bool is_init = false) const; bool CheckArgs(const TypePList* args, bool is_init = false) const;
bool CheckArgs(const std::vector<TypePtr>& args, bool CheckArgs(const std::vector<TypePtr>& args,
bool is_init = false) const; bool is_init = false) const;

View file

@ -3521,7 +3521,7 @@ bool same_atomic_val(const Val* v1, const Val* v2)
return false; return false;
} }
void describe_vals(const val_list* vals, ODesc* d, int offset) void describe_vals(const ValPList* vals, ODesc* d, int offset)
{ {
if ( ! d->IsReadable() ) if ( ! d->IsReadable() )
{ {
@ -3556,7 +3556,7 @@ void describe_vals(const std::vector<ValPtr>& vals,
} }
} }
void delete_vals(val_list* vals) void delete_vals(ValPList* vals)
{ {
if ( vals ) if ( vals )
{ {

View file

@ -1408,10 +1408,10 @@ extern ValPtr check_and_promote(
extern bool same_val(const Val* v1, const Val* v2); extern bool same_val(const Val* v1, const Val* v2);
extern bool same_atomic_val(const Val* v1, const Val* v2); extern bool same_atomic_val(const Val* v1, const Val* v2);
extern bool is_atomic_val(const Val* v); extern bool is_atomic_val(const Val* v);
extern void describe_vals(const val_list* vals, ODesc* d, int offset=0); extern void describe_vals(const ValPList* vals, ODesc* d, int offset=0);
extern void describe_vals(const std::vector<ValPtr>& vals, extern void describe_vals(const std::vector<ValPtr>& vals,
ODesc* d, size_t offset = 0); ODesc* d, size_t offset = 0);
extern void delete_vals(val_list* vals); extern void delete_vals(ValPList* vals);
// True if the given Val* has a vector type. // True if the given Val* has a vector type.
inline bool is_vector(Val* v) { return v->GetType()->Tag() == zeek::TYPE_VECTOR; } inline bool is_vector(Val* v) { return v->GetType()->Tag() == zeek::TYPE_VECTOR; }

View file

@ -744,12 +744,12 @@ zeek::Val* internal_val(const char* name)
return zeek::id::find_val(name).get(); return zeek::id::find_val(name).get();
} }
id_list gather_outer_ids(zeek::detail::Scope* scope, zeek::detail::Stmt* body) IDPList gather_outer_ids(zeek::detail::Scope* scope, zeek::detail::Stmt* body)
{ {
OuterIDBindingFinder cb(scope); OuterIDBindingFinder cb(scope);
body->Traverse(&cb); body->Traverse(&cb);
id_list idl ( cb.outer_id_references.size() ); IDPList idl ( cb.outer_id_references.size() );
for ( size_t i = 0; i < cb.outer_id_references.size(); ++i ) for ( size_t i = 0; i < cb.outer_id_references.size(); ++i )
{ {

View file

@ -52,7 +52,7 @@ extern void begin_func(zeek::detail::IDPtr id, const char* module_name,
extern void end_func(zeek::detail::StmtPtr body); extern void end_func(zeek::detail::StmtPtr body);
// Gather all IDs referenced inside a body that aren't part of a given scope. // Gather all IDs referenced inside a body that aren't part of a given scope.
extern id_list gather_outer_ids(zeek::detail::Scope* scope, zeek::detail::Stmt* body); extern IDPList gather_outer_ids(zeek::detail::Scope* scope, zeek::detail::Stmt* body);
} // namespace zeek::detail } // namespace zeek::detail

View file

@ -4,7 +4,7 @@
#include "ID.h" #include "ID.h"
#include "Desc.h" #include "Desc.h"
zeek::Args zeek::val_list_to_args(const val_list& vl) zeek::Args zeek::val_list_to_args(const ValPList& vl)
{ {
zeek::Args rval; zeek::Args rval;
rval.reserve(vl.length()); rval.reserve(vl.length());

View file

@ -25,7 +25,7 @@ using Args = std::vector<ValPtr>;
* @return the converted argument list * @return the converted argument list
* *
*/ */
Args val_list_to_args(const val_list& vl); Args val_list_to_args(const ValPList& vl);
/** /**
* Creates a vector of "call_argument" meta data describing the arguments to * Creates a vector of "call_argument" meta data describing the arguments to

View file

@ -15,20 +15,20 @@ ZEEK_FORWARD_DECLARE_NAMESPACED(Timer, zeek::detail);
namespace zeek { namespace zeek {
using val_list = PList<Val>; using ValPList = PList<Val>;
using expr_list = PList<detail::Expr>; using ExprPList = PList<detail::Expr>;
using id_list = PList<detail::ID>; using IDPList = PList<detail::ID>;
using stmt_list = PList<detail::Stmt>; using StmtPList = PList<detail::Stmt>;
using type_list = PList<Type>; using TypePList = PList<Type>;
using attr_list = PList<detail::Attr>; using AttrPList = PList<detail::Attr>;
using timer_list = PList<detail::Timer, ListOrder::UNORDERED>; using TimerPList = PList<detail::Timer, ListOrder::UNORDERED>;
} // namespace zeek } // namespace zeek
using val_list [[deprecated("Remove in v4.1. Use zeek::val_list.")]] = zeek::val_list; using val_list [[deprecated("Remove in v4.1. Use zeek::ValPList.")]] = zeek::ValPList;
using expr_list [[deprecated("Remove in v4.1. Use zeek::expr_list.")]] = zeek::expr_list; using expr_list [[deprecated("Remove in v4.1. Use zeek::ExprPList.")]] = zeek::ExprPList;
using id_list [[deprecated("Remove in v4.1. Use zeek::id_list.")]] = zeek::id_list; using id_list [[deprecated("Remove in v4.1. Use zeek::IDPList.")]] = zeek::IDPList;
using stmt_list [[deprecated("Remove in v4.1. Use zeek::stmt_list.")]] = zeek::stmt_list; using stmt_list [[deprecated("Remove in v4.1. Use zeek::StmtPList.")]] = zeek::StmtPList;
using type_list [[deprecated("Remove in v4.1. Use zeek::type_list.")]] = zeek::type_list; using type_list [[deprecated("Remove in v4.1. Use zeek::TypePList.")]] = zeek::TypePList;
using attr_list [[deprecated("Remove in v4.1. Use zeek::attr_list.")]] = zeek::attr_list; using attr_list [[deprecated("Remove in v4.1. Use zeek::AttrPList.")]] = zeek::AttrPList;
using timer_list [[deprecated("Remove in v4.1. Use zeek::timer_list.")]] = zeek::timer_list; using timer_list [[deprecated("Remove in v4.1. Use zeek::TimerPList.")]] = zeek::TimerPList;

View file

@ -748,7 +748,7 @@ void Analyzer::CancelTimers()
// call RemoveTimer(), which would then modify the list we're just // call RemoveTimer(), which would then modify the list we're just
// traversing. Thus, we first make a copy of the list which we then // traversing. Thus, we first make a copy of the list which we then
// iterate through. // iterate through.
timer_list tmp(timers.length()); TimerPList tmp(timers.length());
std::copy(timers.begin(), timers.end(), back_inserter(tmp)); std::copy(timers.begin(), timers.end(), back_inserter(tmp));
// TODO: could be a for_each // TODO: could be a for_each
@ -813,7 +813,7 @@ void Analyzer::Event(EventHandlerPtr f, zeek::Val* v1, zeek::Val* v2)
conn->EnqueueEvent(f, this, conn->ConnVal(), std::move(val1), std::move(val2)); conn->EnqueueEvent(f, this, conn->ConnVal(), std::move(val1), std::move(val2));
} }
void Analyzer::ConnectionEvent(EventHandlerPtr f, val_list* vl) void Analyzer::ConnectionEvent(EventHandlerPtr f, ValPList* vl)
{ {
auto args = zeek::val_list_to_args(*vl); auto args = zeek::val_list_to_args(*vl);
@ -821,7 +821,7 @@ void Analyzer::ConnectionEvent(EventHandlerPtr f, val_list* vl)
conn->EnqueueEvent(f, this, std::move(args)); conn->EnqueueEvent(f, this, std::move(args));
} }
void Analyzer::ConnectionEvent(EventHandlerPtr f, val_list vl) void Analyzer::ConnectionEvent(EventHandlerPtr f, ValPList vl)
{ {
auto args = zeek::val_list_to_args(vl); auto args = zeek::val_list_to_args(vl);
@ -829,7 +829,7 @@ void Analyzer::ConnectionEvent(EventHandlerPtr f, val_list vl)
conn->EnqueueEvent(f, this, std::move(args)); conn->EnqueueEvent(f, this, std::move(args));
} }
void Analyzer::ConnectionEventFast(EventHandlerPtr f, val_list vl) void Analyzer::ConnectionEventFast(EventHandlerPtr f, ValPList vl)
{ {
auto args = zeek::val_list_to_args(vl); auto args = zeek::val_list_to_args(vl);
conn->EnqueueEvent(f, this, std::move(args)); conn->EnqueueEvent(f, this, std::move(args));

View file

@ -583,21 +583,21 @@ public:
* Connection::ConnectionEvent(). * Connection::ConnectionEvent().
*/ */
[[deprecated("Remove in v4.1. Use EnqueueConnEvent() instead.")]] [[deprecated("Remove in v4.1. Use EnqueueConnEvent() instead.")]]
void ConnectionEvent(EventHandlerPtr f, val_list* vl); void ConnectionEvent(EventHandlerPtr f, ValPList* vl);
/** /**
* Convenience function that forwards directly to * Convenience function that forwards directly to
* Connection::ConnectionEvent(). * Connection::ConnectionEvent().
*/ */
[[deprecated("Remove in v4.1. Use EnqueueConnEvent() instead.")]] [[deprecated("Remove in v4.1. Use EnqueueConnEvent() instead.")]]
void ConnectionEvent(EventHandlerPtr f, val_list vl); void ConnectionEvent(EventHandlerPtr f, ValPList vl);
/** /**
* Convenience function that forwards directly to * Convenience function that forwards directly to
* Connection::ConnectionEventFast(). * Connection::ConnectionEventFast().
*/ */
[[deprecated("Remove in v4.1. Use EnqueueConnEvent() instead.")]] [[deprecated("Remove in v4.1. Use EnqueueConnEvent() instead.")]]
void ConnectionEventFast(EventHandlerPtr f, val_list vl); void ConnectionEventFast(EventHandlerPtr f, ValPList vl);
/** /**
* Convenience function that forwards directly to * Convenience function that forwards directly to
@ -743,7 +743,7 @@ private:
bool protocol_confirmed; bool protocol_confirmed;
timer_list timers; TimerPList timers;
bool timers_canceled; bool timers_canceled;
bool skip; bool skip;
bool finished; bool finished;

View file

@ -749,7 +749,7 @@ bool Manager::AutoUnpublishEvent(const string& topic, zeek::Val* event)
return true; return true;
} }
zeek::RecordVal* Manager::MakeEvent(val_list* args, zeek::detail::Frame* frame) zeek::RecordVal* Manager::MakeEvent(ValPList* args, zeek::detail::Frame* frame)
{ {
auto rval = new zeek::RecordVal(zeek::BifType::Record::Broker::Event); auto rval = new zeek::RecordVal(zeek::BifType::Record::Broker::Event);
auto arg_vec = zeek::make_intrusive<zeek::VectorVal>(vector_of_data_type); auto arg_vec = zeek::make_intrusive<zeek::VectorVal>(vector_of_data_type);

View file

@ -236,7 +236,7 @@ public:
* @return an `Event` record value. If an invalid event or arguments * @return an `Event` record value. If an invalid event or arguments
* were supplied the optional "name" field will not be set. * were supplied the optional "name" field will not be set.
*/ */
zeek::RecordVal* MakeEvent(val_list* args, zeek::detail::Frame* frame); zeek::RecordVal* MakeEvent(ValPList* args, zeek::detail::Frame* frame);
/** /**
* Register interest in peer event messages that use a certain topic prefix. * Register interest in peer event messages that use a certain topic prefix.

View file

@ -47,7 +47,7 @@ std::set<std::string> val_to_topic_set(zeek::Val* val)
return rval; return rval;
} }
static bool publish_event_args(zeek::val_list& args, const zeek::String* topic, static bool publish_event_args(zeek::ValPList& args, const zeek::String* topic,
zeek::detail::Frame* frame) zeek::detail::Frame* frame)
{ {
zeek::Broker::Manager::ScriptScopeGuard ssg; zeek::Broker::Manager::ScriptScopeGuard ssg;
@ -84,7 +84,7 @@ function Broker::make_event%(...%): Broker::Event
%{ %{
zeek::Broker::Manager::ScriptScopeGuard ssg; zeek::Broker::Manager::ScriptScopeGuard ssg;
const auto& bif_args = @ARGS@; const auto& bif_args = @ARGS@;
val_list args(bif_args->size()); ValPList args(bif_args->size());
for ( auto i = 0u; i < bif_args->size(); ++i ) for ( auto i = 0u; i < bif_args->size(); ++i )
args.push_back((*bif_args)[i].get()); args.push_back((*bif_args)[i].get());
@ -104,7 +104,7 @@ function Broker::make_event%(...%): Broker::Event
function Broker::publish%(topic: string, ...%): bool function Broker::publish%(topic: string, ...%): bool
%{ %{
const auto& bif_args = @ARGS@; const auto& bif_args = @ARGS@;
val_list args(bif_args->size() - 1); ValPList args(bif_args->size() - 1);
for ( auto i = 1u; i < bif_args->size(); ++i ) for ( auto i = 1u; i < bif_args->size(); ++i )
args.push_back((*bif_args)[i].get()); args.push_back((*bif_args)[i].get());
@ -194,7 +194,7 @@ function Cluster::publish_rr%(pool: Pool, key: string, ...%): bool
return zeek::val_mgr->False(); return zeek::val_mgr->False();
const auto& bif_args = @ARGS@; const auto& bif_args = @ARGS@;
val_list args(bif_args->size() - 2); ValPList args(bif_args->size() - 2);
for ( auto i = 2u; i < bif_args->size(); ++i ) for ( auto i = 2u; i < bif_args->size(); ++i )
args.push_back((*bif_args)[i].get()); args.push_back((*bif_args)[i].get());
@ -231,7 +231,7 @@ function Cluster::publish_hrw%(pool: Pool, key: any, ...%): bool
return zeek::val_mgr->False(); return zeek::val_mgr->False();
const auto& bif_args = @ARGS@; const auto& bif_args = @ARGS@;
val_list args(bif_args->size() - 2); ValPList args(bif_args->size() - 2);
for ( auto i = 2u; i < bif_args->size(); ++i ) for ( auto i = 2u; i < bif_args->size(); ++i )
args.push_back((*bif_args)[i].get()); args.push_back((*bif_args)[i].get());

View file

@ -625,13 +625,13 @@ void File::FileEvent(zeek::EventHandlerPtr h)
FileEvent(h, zeek::Args{val}); FileEvent(h, zeek::Args{val});
} }
void File::FileEvent(zeek::EventHandlerPtr h, val_list* vl) void File::FileEvent(zeek::EventHandlerPtr h, ValPList* vl)
{ {
FileEvent(h, zeek::val_list_to_args(*vl)); FileEvent(h, zeek::val_list_to_args(*vl));
delete vl; delete vl;
} }
void File::FileEvent(zeek::EventHandlerPtr h, val_list vl) void File::FileEvent(zeek::EventHandlerPtr h, ValPList vl)
{ {
FileEvent(h, zeek::val_list_to_args(vl)); FileEvent(h, zeek::val_list_to_args(vl));
} }

View file

@ -9,7 +9,7 @@
#include "analyzer/Tag.h" #include "analyzer/Tag.h"
#include "AnalyzerSet.h" #include "AnalyzerSet.h"
#include "ZeekString.h" #include "ZeekString.h"
#include "ZeekList.h" // for val_list #include "ZeekList.h" // for ValPList
#include "ZeekArgs.h" #include "ZeekArgs.h"
#include "WeirdState.h" #include "WeirdState.h"
@ -193,7 +193,7 @@ public:
* @param vl list of argument values to pass to event call. * @param vl list of argument values to pass to event call.
*/ */
[[deprecated("Remove in v4.1. Use zeek::Args overload instead.")]] [[deprecated("Remove in v4.1. Use zeek::Args overload instead.")]]
void FileEvent(zeek::EventHandlerPtr h, val_list* vl); void FileEvent(zeek::EventHandlerPtr h, ValPList* vl);
/** /**
* Raises an event related to the file's life-cycle. * Raises an event related to the file's life-cycle.
@ -201,7 +201,7 @@ public:
* @param vl list of argument values to pass to event call. * @param vl list of argument values to pass to event call.
*/ */
[[deprecated("Remove in v4.1. Use zeek::Args overload instead.")]] [[deprecated("Remove in v4.1. Use zeek::Args overload instead.")]]
void FileEvent(zeek::EventHandlerPtr h, val_list vl); void FileEvent(zeek::EventHandlerPtr h, ValPList vl);
/** /**
* Raises an event related to the file's life-cycle. * Raises an event related to the file's life-cycle.

View file

@ -232,7 +232,7 @@ static bool expr_is_table_type_name(const zeek::detail::Expr* expr)
bool b; bool b;
char* str; char* str;
zeek::detail::ID* id; zeek::detail::ID* id;
zeek::id_list* id_l; zeek::IDPList* id_l;
zeek::detail::InitClass ic; zeek::detail::InitClass ic;
zeek::Val* val; zeek::Val* val;
zeek::RE_Matcher* re; zeek::RE_Matcher* re;
@ -1255,7 +1255,7 @@ lambda_body:
auto ingredients = std::make_unique<zeek::detail::function_ingredients>( auto ingredients = std::make_unique<zeek::detail::function_ingredients>(
zeek::IntrusivePtr{zeek::NewRef{}, zeek::detail::current_scope()}, zeek::IntrusivePtr{zeek::NewRef{}, zeek::detail::current_scope()},
zeek::IntrusivePtr{zeek::AdoptRef{}, $3}); zeek::IntrusivePtr{zeek::AdoptRef{}, $3});
zeek::id_list outer_ids = zeek::detail::gather_outer_ids(zeek::detail::pop_scope().get(), ingredients->body.get()); zeek::IDPList outer_ids = zeek::detail::gather_outer_ids(zeek::detail::pop_scope().get(), ingredients->body.get());
$$ = new zeek::detail::LambdaExpr(std::move(ingredients), std::move(outer_ids)); $$ = new zeek::detail::LambdaExpr(std::move(ingredients), std::move(outer_ids));
} }
@ -1653,7 +1653,7 @@ case_type_list:
| |
case_type case_type
{ {
$$ = new zeek::id_list; $$ = new zeek::IDPList;
$$->push_back($1); $$->push_back($1);
} }
; ;
@ -1704,7 +1704,7 @@ for_head:
false, false); false, false);
} }
auto* loop_vars = new zeek::id_list; auto* loop_vars = new zeek::IDPList;
loop_vars->push_back(loop_var.release()); loop_vars->push_back(loop_var.release());
$$ = new zeek::detail::ForStmt(loop_vars, {zeek::AdoptRef{}, $5}); $$ = new zeek::detail::ForStmt(loop_vars, {zeek::AdoptRef{}, $5});
@ -1742,7 +1742,7 @@ for_head:
else else
val_var = zeek::detail::install_ID($5, module, false, false); val_var = zeek::detail::install_ID($5, module, false, false);
auto* loop_vars = new zeek::id_list; auto* loop_vars = new zeek::IDPList;
loop_vars->push_back(key_var.release()); loop_vars->push_back(key_var.release());
$$ = new zeek::detail::ForStmt(loop_vars, {zeek::AdoptRef{}, $7}, std::move(val_var)); $$ = new zeek::detail::ForStmt(loop_vars, {zeek::AdoptRef{}, $7}, std::move(val_var));
@ -1773,7 +1773,7 @@ local_id_list:
{ $1->push_back($3); } { $1->push_back($3); }
| local_id | local_id
{ {
$$ = new zeek::id_list; $$ = new zeek::IDPList;
$$->push_back($1); $$->push_back($1);
} }
; ;

View file

@ -621,7 +621,7 @@ Manager::HookCallFunction(const zeek::Func* func, zeek::detail::Frame* parent,
zeek::Args* vecargs) const zeek::Args* vecargs) const
{ {
HookArgumentList args; HookArgumentList args;
val_list vargs; ValPList vargs;
if ( HavePluginForHook(zeek::plugin::META_HOOK_PRE) ) if ( HavePluginForHook(zeek::plugin::META_HOOK_PRE) )
{ {
@ -865,7 +865,7 @@ bool Manager::HookLogWrite(const std::string& writer,
} }
bool Manager::HookReporter(const std::string& prefix, const EventHandlerPtr event, bool Manager::HookReporter(const std::string& prefix, const EventHandlerPtr event,
const zeek::Connection* conn, const val_list* addl, bool location, const zeek::Connection* conn, const ValPList* addl, bool location,
const zeek::detail::Location* location1, const zeek::detail::Location* location1,
const zeek::detail::Location* location2, const zeek::detail::Location* location2,
bool time, const std::string& message) bool time, const std::string& message)

View file

@ -389,7 +389,7 @@ public:
* if the event call should be skipped * if the event call should be skipped
*/ */
bool HookReporter(const std::string& prefix, const EventHandlerPtr event, bool HookReporter(const std::string& prefix, const EventHandlerPtr event,
const Connection* conn, const val_list* addl, bool location, const Connection* conn, const ValPList* addl, bool location,
const zeek::detail::Location* location1, const zeek::detail::Location* location2, const zeek::detail::Location* location1, const zeek::detail::Location* location2,
bool time, const std::string& message); bool time, const std::string& message);

View file

@ -379,7 +379,7 @@ std::pair<bool, zeek::ValPtr>
Plugin::HookFunctionCall(const zeek::Func* func, zeek::detail::Frame* parent, Plugin::HookFunctionCall(const zeek::Func* func, zeek::detail::Frame* parent,
zeek::Args* args) zeek::Args* args)
{ {
val_list vlargs(args->size()); ValPList vlargs(args->size());
for ( auto& v : *args ) for ( auto& v : *args )
vlargs.push_back(v.release()); vlargs.push_back(v.release());
@ -396,7 +396,7 @@ Plugin::HookFunctionCall(const zeek::Func* func, zeek::detail::Frame* parent,
} }
std::pair<bool, zeek::Val*> Plugin::HookCallFunction( std::pair<bool, zeek::Val*> Plugin::HookCallFunction(
const zeek::Func* func, zeek::detail::Frame *parent, val_list* args) const zeek::Func* func, zeek::detail::Frame *parent, ValPList* args)
{ {
std::pair<bool, zeek::Val*> result(false, NULL); std::pair<bool, zeek::Val*> result(false, NULL);
return result; return result;
@ -440,7 +440,7 @@ bool Plugin::HookLogWrite(const std::string& writer, const std::string& filter,
} }
bool Plugin::HookReporter(const std::string& prefix, const EventHandlerPtr event, bool Plugin::HookReporter(const std::string& prefix, const EventHandlerPtr event,
const Connection* conn, const val_list* addl, bool location, const Connection* conn, const ValPList* addl, bool location,
const zeek::detail::Location* location1, const zeek::detail::Location* location1,
const zeek::detail::Location* location2, const zeek::detail::Location* location2,
bool time, const std::string& message) bool time, const std::string& message)

View file

@ -226,7 +226,7 @@ public:
/** /**
* Constructor with a list of Bro values argument. * Constructor with a list of Bro values argument.
*/ */
explicit HookArgument(const val_list* a) { type = VAL_LIST; arg.vals = a; } explicit HookArgument(const ValPList* a) { type = VAL_LIST; arg.vals = a; }
/** /**
* Constructor with a void pointer argument. * Constructor with a void pointer argument.
@ -339,7 +339,7 @@ public:
* Returns the value for a list of Bro values argument. The argument's type must * Returns the value for a list of Bro values argument. The argument's type must
* match accordingly. * match accordingly.
*/ */
const val_list* AsValList() const { assert(type == VAL_LIST); return arg.vals; } const ValPList* AsValList() const { assert(type == VAL_LIST); return arg.vals; }
/** /**
* Returns the value as a zeek::Args. * Returns the value as a zeek::Args.
@ -375,7 +375,7 @@ private:
const zeek::detail::Frame* frame; const zeek::detail::Frame* frame;
int int_; int int_;
const Val* val; const Val* val;
const val_list* vals; const ValPList* vals;
const zeek::Args* args; const zeek::Args* args;
const void* voidp; const void* voidp;
const logging::WriterBackend::WriterInfo* winfo; const logging::WriterBackend::WriterInfo* winfo;
@ -682,7 +682,7 @@ protected:
HookFunctionCall(const zeek::Func* func, zeek::detail::Frame* parent, zeek::Args* args); HookFunctionCall(const zeek::Func* func, zeek::detail::Frame* parent, zeek::Args* args);
[[deprecated("Remove in v4.1. Use HookFunctionCall()")]] [[deprecated("Remove in v4.1. Use HookFunctionCall()")]]
virtual std::pair<bool, Val*> HookCallFunction(const zeek::Func* func, zeek::detail::Frame *parent, val_list* args); virtual std::pair<bool, Val*> HookCallFunction(const zeek::Func* func, zeek::detail::Frame *parent, ValPList* args);
/** /**
* Hook into raising events. Whenever the script interpreter is about * Hook into raising events. Whenever the script interpreter is about
@ -833,7 +833,7 @@ protected:
* if the event call should be skipped * if the event call should be skipped
*/ */
virtual bool HookReporter(const std::string& prefix, const EventHandlerPtr event, virtual bool HookReporter(const std::string& prefix, const EventHandlerPtr event,
const Connection* conn, const val_list* addl, bool location, const Connection* conn, const ValPList* addl, bool location,
const zeek::detail::Location* location1, const zeek::detail::Location* location2, const zeek::detail::Location* location1, const zeek::detail::Location* location2,
bool time, const std::string& message); bool time, const std::string& message);