From 27dd50867f891739579bc1cc39874bfb6537fd11 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Tue, 26 Nov 2013 14:54:11 +0100 Subject: Fix a macro redefinition when compiling against Lua 5.2 with compatibility options enabled --- src/tools.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/tools.h b/src/tools.h index f775c70..b48114c 100644 --- a/src/tools.h +++ b/src/tools.h @@ -32,7 +32,9 @@ void luaL_requiref (lua_State* L, const char* modname, lua_CFunction openf, int // wrap Lua 5.2 calls under Lua 5.1 API when it is simpler that way #if LUA_VERSION_NUM == 502 +#ifndef lua_equal // already defined when compatibility is active in luaconf.h #define lua_equal( L, a, b) lua_compare( L, a, b, LUA_OPEQ) +#endif // lua_equal #define lua_lessthan( L, a, b) lua_compare( L, a, b, LUA_OPLT) #define luaG_registerlibfuncs( L, _funcs) luaL_setfuncs( L, _funcs, 0) #endif // LUA_VERSION_NUM == 502 -- cgit v1.2.3-55-g6feb