mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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
|
@ -246,15 +246,18 @@ string CPPCompile::GenCallExpr(const CallExpr* c, GenType gt)
|
|||
auto f_id = f->AsNameExpr()->Id();
|
||||
const auto& params = f_id->GetType()->AsFuncType()->Params();
|
||||
auto id_name = f_id->Name();
|
||||
auto fname = Canonicalize(id_name) + "_zf";
|
||||
|
||||
bool is_compiled = compiled_funcs.count(fname) > 0;
|
||||
bool is_compiled = compiled_simple_funcs.count(id_name) > 0;
|
||||
bool was_compiled = hashed_funcs.count(id_name) > 0;
|
||||
|
||||
if ( is_compiled || was_compiled )
|
||||
{
|
||||
string fname;
|
||||
|
||||
if ( was_compiled )
|
||||
fname = hashed_funcs[id_name];
|
||||
else
|
||||
fname = compiled_simple_funcs[id_name];
|
||||
|
||||
if ( args_l->Exprs().length() > 0 )
|
||||
gen = fname + "(" + GenArgs(params, args_l) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue