Explorar o código

Move LUA_OK definition to compat.hpp

Ole %!s(int64=9) %!d(string=hai) anos
pai
achega
4feecc98ea
Modificáronse 2 ficheiros con 7 adicións e 6 borrados
  1. 0 5
      lib/luwra/common.hpp
  2. 7 1
      lib/luwra/compat.hpp

+ 0 - 5
lib/luwra/common.hpp

@@ -18,11 +18,6 @@ extern "C" {
 	#error Luwra has not been tested against your installed version of Lua
 #endif
 
-// LUA_OK does not exist in Lua 5.1 and earlier
-#ifndef LUA_OK
-	#define LUA_OK 0
-#endif
-
 // Namespaces
 #define LUWRA_NS_BEGIN namespace luwra {
 #define LUWRA_NS_END }

+ 7 - 1
lib/luwra/compat.hpp

@@ -31,7 +31,13 @@ namespace internal {
 
 LUWRA_NS_END
 
-#ifdef _MSC_VER // Because VS C++
+// LUA_OK does not exist in Lua 5.1 and earlier
+#ifndef LUA_OK
+	#define LUA_OK 0
+#endif
+
+// Because VS C++
+#ifdef _MSC_VER
 	#define __LUWRA_NS_RESOLVE(a, b) a::##b
 #else
 	#define __LUWRA_NS_RESOLVE(a, b) a::b