From: Marek VavruĊĦa Date: Mon, 25 May 2015 12:26:31 +0000 (+0200) Subject: modules/stats: compat for Lua < 5.2 X-Git-Tag: v1.0.0-beta1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49059e4a3aa50914b82418f389617c7008645fc2;p=thirdparty%2Fknot-resolver.git modules/stats: compat for Lua < 5.2 --- diff --git a/modules/stats/stats.c b/modules/stats/stats.c index 49b87d595..357b4d5e2 100644 --- a/modules/stats/stats.c +++ b/modules/stats/stats.c @@ -30,6 +30,11 @@ #include "lib/module.h" #include "lib/layer.h" +/** @internal Compatibility wrapper for Lua < 5.2 */ +#if LUA_VERSION_NUM < 502 +#define lua_rawlen(L, obj) lua_objlen((L), (obj)) +#endif + /* Defaults */ #define DEBUG_MSG(qry, fmt...) QRDEBUG(qry, "stat", fmt)