mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Allow access to global variables using GLOBAL:: namespace.
Addresses BIT-1758. Patch was contributed by François Pennaneach <francois.pennaneach@free.fr>.
This commit is contained in:
parent
ad345d7277
commit
8eddeed78f
3 changed files with 7 additions and 0 deletions
|
@ -52,7 +52,12 @@ string make_full_var_name(const char* module_name, const char* var_name)
|
|||
{
|
||||
if ( ! module_name || streq(module_name, GLOBAL_MODULE_NAME) ||
|
||||
strstr(var_name, "::") )
|
||||
{
|
||||
if ( streq(GLOBAL_MODULE_NAME, extract_module_name(var_name).c_str()) )
|
||||
return extract_var_name(var_name);
|
||||
|
||||
return string(var_name);
|
||||
}
|
||||
|
||||
string full_name = normalized_module_name(module_name);
|
||||
full_name += "::";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue