mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
support for standalone compiled scripts to export globals with module qualifiers
This commit is contained in:
parent
4ecf70f515
commit
b4f025dda9
5 changed files with 59 additions and 19 deletions
|
@ -109,9 +109,11 @@ void CPPCompile::CreateGlobal(const ID* g)
|
|||
const auto& t = g->GetType();
|
||||
NoteInitDependency(g, TypeRep(t));
|
||||
|
||||
auto exported = g->IsExport() ? "true" : "false";
|
||||
|
||||
AddInit(g, globals[gn],
|
||||
string("lookup_global__CPP(\"") + gn + "\", " +
|
||||
GenTypeName(t) + ")");
|
||||
GenTypeName(t) + ", " + exported + ")");
|
||||
}
|
||||
|
||||
if ( is_bif )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue