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
|
@ -108,6 +108,14 @@ struct CompiledScript {
|
|||
// Maps hashes to compiled information.
|
||||
extern std::unordered_map<p_hash_type, CompiledScript> compiled_scripts;
|
||||
|
||||
// When using standalone-code, tracks which function bodies have had
|
||||
// compiled versions added to them. Needed so that we don't replace
|
||||
// the body twice, leading to two copies. Indexed first by the name
|
||||
// of the function, and then via the hash of the body that has been
|
||||
// added to it.
|
||||
extern std::unordered_map<std::string, std::unordered_set<p_hash_type>>
|
||||
added_bodies;
|
||||
|
||||
// Maps hashes to standalone script initialization callbacks.
|
||||
extern std::unordered_map<p_hash_type, void (*)()> standalone_callbacks;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue