mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
fixes for standalone C++ scripts making types & variables/functions available
This commit is contained in:
parent
fb9c73fa86
commit
725aa558a7
13 changed files with 125 additions and 19 deletions
|
@ -168,7 +168,12 @@ void CPPCompile::AddBiF(const ID* b, bool is_var)
|
|||
if ( AddGlobal(n, "bif", true) )
|
||||
Emit("Func* %s;", globals[n]);
|
||||
|
||||
AddInit(b, globals[n], string("lookup_bif__CPP(\"") + bn + "\")");
|
||||
auto lookup = string("lookup_bif__CPP(\"") + bn + "\")";
|
||||
|
||||
if ( standalone )
|
||||
AddActivation(globals[n] + " = " + lookup + ";");
|
||||
else
|
||||
AddInit(b, globals[n], lookup);
|
||||
}
|
||||
|
||||
bool CPPCompile::AddGlobal(const string& g, const char* suffix, bool track)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue