fixes for standalone C++ scripts making types & variables/functions available

This commit is contained in:
Vern Paxson 2021-06-04 17:14:46 -07:00
parent fb9c73fa86
commit 725aa558a7
13 changed files with 125 additions and 19 deletions

View file

@ -20,6 +20,15 @@ typedef void (*CPP_init_func)();
// Tracks the initialization hooks for different compilation runs.
extern std::vector<CPP_init_func> CPP_init_funcs;
// Tracks the activation hooks for different "standalone" compilations.
extern std::vector<CPP_init_func> CPP_activation_funcs;
// Activates all previously registered standalone code.
extern void activate__CPPs();
// Registers the given global type, if not already present.
extern void register_type__CPP(TypePtr t, const std::string& name);
// Registers the given compiled function body as associated with the
// given priority and hash. "events" is a list of event handlers
// relevant for the function body, which should be registered if the