diff --git a/src/celestia/celx.h b/src/celestia/celx.h index 20696bda..82a38a3d 100644 --- a/src/celestia/celx.h +++ b/src/celestia/celx.h @@ -12,10 +12,6 @@ #ifndef _CELESTIA_CELX_H_ #define _CELESTIA_CELX_H_ -#ifndef LUA_VER -#define LUA_VER 0x050100 -#endif - #include #include #include @@ -23,7 +19,11 @@ #include #include -#if LUA_VER < 0x050300 +#ifndef LUA_VERSION_NUM +#define LUA_VERSION_NUM 501 +#endif + +#if LUA_VERSION_NUM < 503 int lua_isinteger(lua_State *L, int index); #endif diff --git a/src/celestia/celx_observer.cpp b/src/celestia/celx_observer.cpp index 5ba5a7de..d5dfc193 100644 --- a/src/celestia/celx_observer.cpp +++ b/src/celestia/celx_observer.cpp @@ -920,7 +920,7 @@ void CreateObserverMetaTable(lua_State* l) celx.registerMethod("__tostring", observer_tostring); celx.registerMethod("isvalid", observer_isvalid); -#if LUA_VER < 0x050200 +#if LUA_VERSION_NUM < 502 celx.registerMethod("goto", observer_goto); #endif celx.registerMethod("gotoobject", observer_goto);