From 49059e4a3aa50914b82418f389617c7008645fc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Vavru=C5=A1a?= Date: Mon, 25 May 2015 14:26:31 +0200 Subject: [PATCH] modules/stats: compat for Lua < 5.2 --- modules/stats/stats.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.47.2