mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
use dynamic rather than static initialization of globals for scripts compiled to C++
This commit is contained in:
parent
6ad28b37e6
commit
0687959f1c
5 changed files with 59 additions and 14 deletions
|
@ -485,11 +485,10 @@ void CPP_GlobalInit::Generate(InitsManager* im, std::vector<void*>& /* inits_vec
|
|||
global = lookup_global__CPP(name, im->Types(type), exported);
|
||||
|
||||
if ( ! global->HasVal() && val >= 0 )
|
||||
{
|
||||
global->SetVal(im->ConstVals(val));
|
||||
if ( attrs >= 0 )
|
||||
global->SetAttrs(im->Attributes(attrs));
|
||||
}
|
||||
|
||||
if ( attrs >= 0 )
|
||||
global->SetAttrs(im->Attributes(attrs));
|
||||
}
|
||||
|
||||
void generate_indices_set(int* inits, std::vector<std::vector<int>>& indices_set)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue