diff --git a/src/Frame.h b/src/Frame.h index 57827f1b5b..1003be2ce5 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -42,6 +42,10 @@ public: * @param n the index to get. * @return the value at index *n* of the underlying array. */ + const IntrusivePtr& GetElement(int n) const + { return frame[n]; } + + [[deprecated("Remove in v4.1. Use GetElement(int).")]] Val* NthElement(int n) const { return frame[n].get(); } /** diff --git a/src/Func.cc b/src/Func.cc index 8553d9234f..b35736db92 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -367,7 +367,7 @@ IntrusivePtr BroFunc::operator()(zeek::Args* args, Frame* parent) const { const auto& arg = (*args)[j]; - if ( f->NthElement(j) != arg ) + if ( f->GetElement(j) != arg ) // Either not yet set, or somebody reassigned the frame slot. f->SetElement(j, arg); }