mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Address PR review feedback on zam-feature-complete
* insert_or_assign usage * master -> primary * FunctionIngredientsPtr * FuncType::Capture deprecations * no new ScriptFunc constructor
This commit is contained in:
parent
46d3526b40
commit
cb15e0d4f1
11 changed files with 71 additions and 53 deletions
10
src/Func.h
10
src/Func.h
|
@ -116,7 +116,10 @@ public:
|
|||
}
|
||||
|
||||
// Various ways to add a new event handler to an existing function
|
||||
// (event).
|
||||
// (event). The usual version to use is the first with its default
|
||||
// parameter. All of the others are for use by script optimization,
|
||||
// as is a non-default second parameter to the first method, which
|
||||
// overrides the function body in "ingr".
|
||||
void AddBody(const detail::FunctionIngredients& ingr, detail::StmtPtr new_body = nullptr);
|
||||
virtual void AddBody(detail::StmtPtr new_body, const std::vector<detail::IDPtr>& new_inits,
|
||||
size_t new_frame_size, int priority,
|
||||
|
@ -172,7 +175,6 @@ class ScriptFunc : public Func
|
|||
{
|
||||
public:
|
||||
ScriptFunc(const IDPtr& id);
|
||||
ScriptFunc(const ID* id);
|
||||
|
||||
// For compiled scripts.
|
||||
ScriptFunc(std::string name, FuncTypePtr ft, std::vector<StmtPtr> bodies,
|
||||
|
@ -384,7 +386,7 @@ public:
|
|||
|
||||
// Used by script optimization to update lambda ingredients
|
||||
// after compilation.
|
||||
void SetFrameSize(size_t _frame_size) { frame_size = std::move(_frame_size); }
|
||||
void SetFrameSize(size_t _frame_size) { frame_size = _frame_size; }
|
||||
|
||||
private:
|
||||
IDPtr id;
|
||||
|
@ -396,6 +398,8 @@ private:
|
|||
std::set<EventGroupPtr> groups;
|
||||
};
|
||||
|
||||
using FunctionIngredientsPtr = std::shared_ptr<FunctionIngredients>;
|
||||
|
||||
extern std::vector<CallInfo> call_stack;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue