mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18: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", {});
|
preinit_body.addCall("zeek_rt::register_spicy_module_end", {});
|
||||||
|
|
||||||
if ( ! preinit_body.empty() ) {
|
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 =
|
auto preinit_function =
|
||||||
builder()->function(hilti::ID("zeek_preinit"),
|
builder()->function(hilti::ID("zeek_preinit"),
|
||||||
builder()->qualifiedType(builder()->typeVoid(), hilti::Constness::Const), {},
|
builder()->qualifiedType(builder()->typeVoid(), hilti::Constness::Const), {},
|
||||||
preinit_body.block(), hilti::type::function::Flavor::Standard,
|
preinit_body.block(), zeek_preinit_flavor, hilti::declaration::Linkage::PreInit);
|
||||||
hilti::declaration::Linkage::PreInit);
|
|
||||||
init_module->add(context(), preinit_function);
|
init_module->add(context(), preinit_function);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue