mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Remove Func::AsScriptFunc() methods
Not used frequently enough, so possibly better to minimize leakage of details from non-detail API.
This commit is contained in:
parent
4824da0325
commit
70ff4ef678
4 changed files with 8 additions and 12 deletions
|
@ -738,10 +738,10 @@ void end_func(StmtPtr body)
|
|||
ingredients->id->SetConst();
|
||||
}
|
||||
|
||||
auto func = ingredients->id->GetVal()->AsFunc()->AsScriptFunc();
|
||||
auto func = cast_intrusive<ScriptFunc>(ingredients->id->GetVal()->AsFuncPtr());
|
||||
func->SetScope(ingredients->scope);
|
||||
|
||||
analyze_func({NewRef{}, func});
|
||||
analyze_func(std::move(func));
|
||||
|
||||
// Note: ideally, something would take ownership of this memory until the
|
||||
// end of script execution, but that's essentially the same as the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue