mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
add some missing "when" closures
This commit is contained in:
parent
025b9b1534
commit
8928aa57e7
6 changed files with 11 additions and 11 deletions
|
@ -10,7 +10,7 @@ global result_count = 0;
|
|||
|
||||
function print_keys(a: opaque of Broker::Store)
|
||||
{
|
||||
when ( local s = Broker::keys(a) )
|
||||
when [a] ( local s = Broker::keys(a) )
|
||||
{
|
||||
print "keys", s;
|
||||
++result_count;
|
||||
|
|
|
@ -12,7 +12,7 @@ global step: count = 0;
|
|||
|
||||
function print_index(k: any)
|
||||
{
|
||||
when ( local r = Broker::get(h, k) )
|
||||
when [k] ( local r = Broker::get(h, k) )
|
||||
{
|
||||
step += 1;
|
||||
print fmt("[%d]", step), k, r$status, r$result;
|
||||
|
@ -26,7 +26,7 @@ function print_index(k: any)
|
|||
|
||||
function print_exists(k: any)
|
||||
{
|
||||
when ( local r = Broker::exists(h, k) )
|
||||
when [k] ( local r = Broker::exists(h, k) )
|
||||
{
|
||||
step += 1;
|
||||
print fmt("[%d]", step), k, r;
|
||||
|
@ -40,7 +40,7 @@ function print_exists(k: any)
|
|||
|
||||
function print_index_from_value(k: any, i: any)
|
||||
{
|
||||
when ( local r = Broker::get_index_from_value(h, k, i) )
|
||||
when [k, i] ( local r = Broker::get_index_from_value(h, k, i) )
|
||||
{
|
||||
step += 1;
|
||||
print fmt("[%d]", step), k, r$status, r$result;
|
||||
|
|
|
@ -12,7 +12,7 @@ global h: opaque of Broker::Store;
|
|||
|
||||
function print_index(k: any)
|
||||
{
|
||||
when ( local r = Broker::get(h, k) )
|
||||
when [k] ( local r = Broker::get(h, k) )
|
||||
{
|
||||
print k, r$status, r$result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue