From 153ffd53e4fbb21fc60a1a08292f946430fd1afe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Vavru=C5=A1a?= Date: Wed, 1 Apr 2015 16:17:30 +0200 Subject: [PATCH] daemon: fixed Lua 5.2 --- daemon/bindings.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/bindings.c b/daemon/bindings.c index f8a80df72..5ed40a3c4 100644 --- a/daemon/bindings.c +++ b/daemon/bindings.c @@ -21,7 +21,7 @@ /** @internal Compatibility wrapper for Lua 5.0 - 5.2 */ #if LUA_VERSION_NUM < 502 -#define lua_len(L, obj) \ +#define lua_rawlen(L, obj) \ lua_objlen((L), (obj)) #define register_lib(L, name, lib) \ luaL_openlib((L), (name), (lib), 0) @@ -186,7 +186,7 @@ static int net_interfaces(lua_State *L) buf[0] = '\0'; } lua_pushstring(L, buf); - lua_rawseti(L, -2, lua_len(L, -2) + 1); + lua_rawseti(L, -2, lua_rawlen(L, -2) + 1); lua_setfield(L, -2, "addr"); /* Hardware address. */ @@ -265,5 +265,5 @@ int lib_cache(lua_State *L) }; register_lib(L, "cache", lib); - return 0; + return 1; } \ No newline at end of file -- 2.47.2