]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix Lua 5.3 compatibility code.
authorThomas Moschny <thomas.moschny@gmx.de>
Sun, 26 Apr 2015 21:25:59 +0000 (23:25 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 1 Jul 2015 15:52:07 +0000 (11:52 -0400)
If Lua 5.3 is compiled with LUA_COMPAT_5_2 defined, the
luaL_checkunsigned compatibility macro is already defined
in lauxlib.h.

Signed-off-by: Thomas Moschny <thomas.moschny@gmx.de>
src/lua-lxc/core.c

index 630a3e4ea64bd55a3c8febaa305e1c0bd6064579..34180a77523c95bb8ca4593c84c07920ffba739f 100644 (file)
 #endif
 
 #if LUA_VERSION_NUM >= 503
+#ifndef luaL_checkunsigned
 #define luaL_checkunsigned(L,n) ((lua_Unsigned)luaL_checkinteger(L,n))
 #endif
+#endif
 
 #ifdef NO_CHECK_UDATA
 #define checkudata(L,i,tname)  lua_touserdata(L, i)