From: Vladimír Čunát Date: Thu, 27 Feb 2020 10:24:00 +0000 (+0100) Subject: make bad a hard informative error X-Git-Tag: v5.1.0~34^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e1aef5ce79394e393ef294b80a3e8e306818a65;p=thirdparty%2Fknot-resolver.git make bad a hard informative error --- diff --git a/daemon/bindings/impl.h b/daemon/bindings/impl.h index 26b4dc80c..0297805d7 100644 --- a/daemon/bindings/impl.h +++ b/daemon/bindings/impl.h @@ -8,6 +8,13 @@ #include #include +/* It may happen that include files are messed up and we're hitting a header + * e.g. from Lua 5.2 or 5.3. Header from 5.1 should work OK, and it's more difficult + * to differentiate from a luajit one. */ +#if LUA_VERSION_NUM != 501 + #error "Incorrect Lua version in #include - LuaJIT compatible with Lua 5.1 is required" +#endif + /** Useful to stringify #defines into error strings. */ #define STR(s) STRINGIFY_TOKEN(s)