Deprecate Func::Call(val_list*, ...)

The version taking a vector of intrusive pointers should be used
instead.  A variadic version is also added that forwards all arguments.
This commit is contained in:
Jon Siwek 2020-03-24 20:38:26 -07:00
parent 4e1ac4e124
commit b667c637df
12 changed files with 114 additions and 90 deletions

View file

@ -188,8 +188,8 @@ function Cluster::publish_rr%(pool: Pool, key: string, ...%): bool
if ( ! topic_func )
topic_func = global_scope()->Lookup("Cluster::rr_topic")->ID_Val()->AsFunc();
val_list vl{pool->Ref(), key->Ref()};
auto topic = topic_func->Call(&vl);
zeek::Args vl{{NewRef{}, pool}, {NewRef{}, key}};
auto topic = topic_func->Call(vl);
if ( ! topic->AsString()->Len() )
return val_mgr->GetFalse();
@ -225,8 +225,8 @@ function Cluster::publish_hrw%(pool: Pool, key: any, ...%): bool
if ( ! topic_func )
topic_func = global_scope()->Lookup("Cluster::hrw_topic")->ID_Val()->AsFunc();
val_list vl{pool->Ref(), key->Ref()};
auto topic = topic_func->Call(&vl);
zeek::Args vl{{NewRef{}, pool}, {NewRef{}, key}};
auto topic = topic_func->Call(vl);
if ( ! topic->AsString()->Len() )
return val_mgr->GetFalse();