Deprecate Scope::Lookup(), replace with Scope::Find()

This commit is contained in:
Jon Siwek 2020-05-12 22:20:42 -07:00
parent a5762c12cc
commit 8f95a2a0bb
27 changed files with 65 additions and 72 deletions

View file

@ -185,7 +185,7 @@ function Cluster::publish_rr%(pool: Pool, key: string, ...%): bool
static Func* topic_func = 0;
if ( ! topic_func )
topic_func = global_scope()->Lookup("Cluster::rr_topic")->GetVal()->AsFunc();
topic_func = global_scope()->Find("Cluster::rr_topic")->GetVal()->AsFunc();
zeek::Args vl{{NewRef{}, pool}, {NewRef{}, key}};
auto topic = topic_func->Call(vl);
@ -222,7 +222,7 @@ function Cluster::publish_hrw%(pool: Pool, key: any, ...%): bool
static Func* topic_func = 0;
if ( ! topic_func )
topic_func = global_scope()->Lookup("Cluster::hrw_topic")->GetVal()->AsFunc();
topic_func = global_scope()->Find("Cluster::hrw_topic")->GetVal()->AsFunc();
zeek::Args vl{{NewRef{}, pool}, {NewRef{}, key}};
auto topic = topic_func->Call(vl);