]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/stats: compat for Lua < 5.2
authorMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 25 May 2015 12:26:31 +0000 (14:26 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 25 May 2015 12:26:31 +0000 (14:26 +0200)
modules/stats/stats.c

index 49b87d5951613c4a186885387b5e4544ca99ee24..357b4d5e2346454bef5a47aeec1635136f808a83 100644 (file)
 #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)