mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/etyp/locals-to-global'
* origin/topic/etyp/locals-to-global: Do not export locals
This commit is contained in:
commit
9c41b6d227
5 changed files with 35 additions and 2 deletions
6
CHANGES
6
CHANGES
|
@ -1,3 +1,9 @@
|
||||||
|
7.2.0-dev.199 | 2025-02-14 11:28:48 -0800
|
||||||
|
|
||||||
|
* Do not export locals (Evan Typanski, Corelight)
|
||||||
|
|
||||||
|
* DPD changes - ZAM baseline updates (Johanna Amann, Corelight)
|
||||||
|
|
||||||
7.2.0-dev.194 | 2025-02-07 07:31:26 +0000
|
7.2.0-dev.194 | 2025-02-07 07:31:26 +0000
|
||||||
|
|
||||||
* Allow to track service violations in conn.log. (Johanna Amann, Corelight)
|
* Allow to track service violations in conn.log. (Johanna Amann, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
7.2.0-dev.194
|
7.2.0-dev.199
|
||||||
|
|
|
@ -2212,7 +2212,7 @@ local_id:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$$ = install_ID($1, current_module.c_str(),
|
$$ = install_ID($1, current_module.c_str(),
|
||||||
false, is_export).release();
|
false, false).release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
3
testing/btest/Baseline/language.locals-to-global/.stdout
Normal file
3
testing/btest/Baseline/language.locals-to-global/.stdout
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
one
|
||||||
|
two
|
24
testing/btest/language/locals-to-global.zeek
Normal file
24
testing/btest/language/locals-to-global.zeek
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# @TEST-DOC: Ensure that locals are not hoisted to global scope.
|
||||||
|
# @TEST-EXEC: zeek -b %INPUT
|
||||||
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff .stdout
|
||||||
|
|
||||||
|
module Test;
|
||||||
|
|
||||||
|
export {
|
||||||
|
function func1()
|
||||||
|
{
|
||||||
|
local t: string = "one";
|
||||||
|
print t;
|
||||||
|
}
|
||||||
|
function func2()
|
||||||
|
{
|
||||||
|
local t: string = "two";
|
||||||
|
print t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
event zeek_init()
|
||||||
|
{
|
||||||
|
func1();
|
||||||
|
func2();
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue