full tracking of the characteristics of globals when compiling scripts to C++

This commit is contained in:
Vern Paxson 2025-09-15 14:21:32 -07:00
parent b25a844210
commit bfc6508dff
6 changed files with 48 additions and 22 deletions

View file

@ -6,6 +6,7 @@
#include "zeek/Val.h"
#include "zeek/script_opt/CPP/Func.h"
#include "zeek/script_opt/CPP/InitsInfo.h"
namespace zeek {
@ -65,9 +66,9 @@ extern void register_scripts__CPP(p_hash_type h, void (*callback)());
extern void activate_bodies__CPP(const char* fn, const char* module, bool exported, TypePtr t,
std::vector<p_hash_type> hashes);
// Looks for a global with the given name. If not present, creates it
// with the given type and export setting.
extern IDPtr lookup_global__CPP(const char* g, const TypePtr& t, bool exported);
// Looks for a global with the given name. If not present, creates it with
// the given type and characteristics.
extern IDPtr lookup_global__CPP(const char* g, const TypePtr& t, const GlobalCharacteristics& gc);
// Looks for a BiF with the given name. Returns nil if not present.
extern Func* lookup_bif__CPP(const char* bif);