diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 1970e767..053e2dde 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2017-04-04 20:15:59.634079 UTC -// This header was generated with sol v2.16.0 (revision 32feb7a) +// Generated 2017-04-07 01:10:42.173645 UTC +// This header was generated with sol v2.16.0 (revision e856abc) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -799,7 +799,7 @@ namespace sol { #include #else #include -#endif // C++ Mangming for Lua +#endif // C++ Mangling for Lua #if defined(_WIN32) || defined(_MSC_VER) #ifndef SOL_CODECVT_SUPPORT @@ -890,7 +890,33 @@ namespace sol { #ifndef SOL_NO_COMPAT -#ifdef SOL_USING_CXX_LUA +#if defined(__cplusplus) && !defined(SOL_USING_CXX_LUA) +extern "C" { +#endif +// beginning of sol/compatibility/5.2.0.h + +#ifndef SOL_5_2_0_H +#define SOL_5_2_0_H + +#if SOL_LUA_VERSION < 503 + +inline int lua_isinteger(lua_State* L, int idx) { + if (lua_type(L, idx) != LUA_TNUMBER) + return 0; + // This is a very slipshod way to do the testing + // but lua_totingerx doesn't play ball nicely + // on older versions... + lua_Number n = lua_tonumber(L, idx); + lua_Integer i = lua_tointeger(L, idx); + if (i != n) + return 0; + // it's DEFINITELY an integer + return 1; +} + +#endif // SOL_LUA_VERSION == 502 +#endif // SOL_5_2_0_H +// end of sol/compatibility/5.2.0.h // beginning of sol/compatibility/5.1.0.h @@ -1114,32 +1140,7 @@ int luaL_fileresult(lua_State *L, int stat, const char *fname); #ifndef SOL_5_X_X_INL #define SOL_5_X_X_INL -// beginning of sol/compatibility/5.2.0.h - -#ifndef SOL_5_2_0_H -#define SOL_5_2_0_H - -#if SOL_LUA_VERSION < 503 - -inline int lua_isinteger(lua_State* L, int idx) { - if (lua_type(L, idx) != LUA_TNUMBER) - return 0; - // This is a very slipshod way to do the testing - // but lua_totingerx doesn't play ball nicely - // on older versions... - lua_Number n = lua_tonumber(L, idx); - lua_Integer i = lua_tointeger(L, idx); - if (i != n) - return 0; - // it's DEFINITELY an integer - return 1; -} - -#endif // SOL_LUA_VERSION == 502 -#endif // SOL_5_2_0_H -// end of sol/compatibility/5.2.0.h - -#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM == 501 +#if SOL_LUA_VERSION < 502 #include @@ -1811,17 +1812,10 @@ inline void luaL_pushresult(luaL_Buffer_52 *B) { #endif // SOL_5_X_X_INL // end of sol/compatibility/5.x.x.inl -#else - -#ifdef __cplusplus -extern "C" { -#endif -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(SOL_USING_CXX_LUA) } #endif -#endif // C++ Mangling for Lua - #endif // SOL_NO_COMPAT // end of sol/compatibility.hpp diff --git a/sol/compatibility.hpp b/sol/compatibility.hpp index 1a9d4e42..f63b1c24 100644 --- a/sol/compatibility.hpp +++ b/sol/compatibility.hpp @@ -31,28 +31,18 @@ #ifndef SOL_NO_COMPAT -#ifdef SOL_USING_CXX_LUA - -#include "compatibility/5.1.0.h" -#include "compatibility/5.0.0.h" -#include "compatibility/5.x.x.h" -#include "compatibility/5.x.x.inl" - -#else - -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(SOL_USING_CXX_LUA) extern "C" { #endif +#include "compatibility/5.2.0.h" #include "compatibility/5.1.0.h" #include "compatibility/5.0.0.h" #include "compatibility/5.x.x.h" #include "compatibility/5.x.x.inl" -#ifdef __cplusplus +#if defined(__cplusplus) && !defined(SOL_USING_CXX_LUA) } #endif -#endif // C++ Mangling for Lua - #endif // SOL_NO_COMPAT #endif // SOL_COMPATIBILITY_HPP diff --git a/sol/compatibility/5.1.0.h b/sol/compatibility/5.1.0.h index fc4956a3..7ae6c7ac 100644 --- a/sol/compatibility/5.1.0.h +++ b/sol/compatibility/5.1.0.h @@ -27,7 +27,6 @@ #if SOL_LUA_VERSION == 501 /* Lua 5.1 */ -#include #include #include #include diff --git a/sol/compatibility/5.2.0.h b/sol/compatibility/5.2.0.h index 7068f2a3..60330122 100644 --- a/sol/compatibility/5.2.0.h +++ b/sol/compatibility/5.2.0.h @@ -21,6 +21,7 @@ #ifndef SOL_5_2_0_H #define SOL_5_2_0_H + #include "version.hpp" #if SOL_LUA_VERSION < 503 diff --git a/sol/compatibility/5.x.x.inl b/sol/compatibility/5.x.x.inl index b32cb7f2..f6a7e2a1 100644 --- a/sol/compatibility/5.x.x.inl +++ b/sol/compatibility/5.x.x.inl @@ -28,7 +28,7 @@ #include "5.0.0.h" #include "5.x.x.h" -#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM == 501 +#if SOL_LUA_VERSION < 502 #include #include diff --git a/sol/compatibility/version.hpp b/sol/compatibility/version.hpp index 9595516c..42b6be91 100644 --- a/sol/compatibility/version.hpp +++ b/sol/compatibility/version.hpp @@ -28,7 +28,7 @@ #include #else #include -#endif // C++ Mangming for Lua +#endif // C++ Mangling for Lua #if defined(_WIN32) || defined(_MSC_VER) #ifndef SOL_CODECVT_SUPPORT