mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Adjust for renamed function flavor in Spicy development version
With zeek/spicy#2048 the flavor for functions was renamed from `Standard` to `Function`. This patch adapts the code for that while still allowing using earlier Spicy versions.
This commit is contained in:
parent
20ada619c5
commit
fbe8dbce5e
2 changed files with 7 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit ceb058a517e1feb042ebbaf6fb80facf4b15a23d
|
||||
Subproject commit abd484926df173d8351bc1269a5ac0ad848b3d6e
|
|
@ -1120,11 +1120,15 @@ bool GlueCompiler::compile() {
|
|||
preinit_body.addCall("zeek_rt::register_spicy_module_end", {});
|
||||
|
||||
if ( ! preinit_body.empty() ) {
|
||||
#if SPICY_VERSION_NUMBER >= 11400
|
||||
constexpr auto zeek_preinit_flavor = hilti::type::function::Flavor::Function;
|
||||
#else
|
||||
constexpr auto zeek_preinit_flavor = hilti::type::function::Flavor::Standard;
|
||||
#endif
|
||||
auto preinit_function =
|
||||
builder()->function(hilti::ID("zeek_preinit"),
|
||||
builder()->qualifiedType(builder()->typeVoid(), hilti::Constness::Const), {},
|
||||
preinit_body.block(), hilti::type::function::Flavor::Standard,
|
||||
hilti::declaration::Linkage::PreInit);
|
||||
preinit_body.block(), zeek_preinit_flavor, hilti::declaration::Linkage::PreInit);
|
||||
init_module->add(context(), preinit_function);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue