Well, that bug was annoying to track down, but it was from the single.py script. This fixes #392

This commit is contained in:
ThePhD 2017-04-06 21:15:22 -04:00
parent e856abc35b
commit 28fff10637
6 changed files with 38 additions and 54 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2017-04-04 20:15:59.634079 UTC // Generated 2017-04-07 01:10:42.173645 UTC
// This header was generated with sol v2.16.0 (revision 32feb7a) // This header was generated with sol v2.16.0 (revision e856abc)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -799,7 +799,7 @@ namespace sol {
#include <lauxlib.h> #include <lauxlib.h>
#else #else
#include <lua.hpp> #include <lua.hpp>
#endif // C++ Mangming for Lua #endif // C++ Mangling for Lua
#if defined(_WIN32) || defined(_MSC_VER) #if defined(_WIN32) || defined(_MSC_VER)
#ifndef SOL_CODECVT_SUPPORT #ifndef SOL_CODECVT_SUPPORT
@ -890,7 +890,33 @@ namespace sol {
#ifndef SOL_NO_COMPAT #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 // 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 #ifndef SOL_5_X_X_INL
#define SOL_5_X_X_INL #define SOL_5_X_X_INL
// beginning of sol/compatibility/5.2.0.h #if SOL_LUA_VERSION < 502
#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
#include <errno.h> #include <errno.h>
@ -1811,17 +1812,10 @@ inline void luaL_pushresult(luaL_Buffer_52 *B) {
#endif // SOL_5_X_X_INL #endif // SOL_5_X_X_INL
// end of sol/compatibility/5.x.x.inl // end of sol/compatibility/5.x.x.inl
#else #if defined(__cplusplus) && !defined(SOL_USING_CXX_LUA)
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} }
#endif #endif
#endif // C++ Mangling for Lua
#endif // SOL_NO_COMPAT #endif // SOL_NO_COMPAT
// end of sol/compatibility.hpp // end of sol/compatibility.hpp

View File

@ -31,28 +31,18 @@
#ifndef SOL_NO_COMPAT #ifndef SOL_NO_COMPAT
#ifdef SOL_USING_CXX_LUA #if defined(__cplusplus) && !defined(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
extern "C" { extern "C" {
#endif #endif
#include "compatibility/5.2.0.h"
#include "compatibility/5.1.0.h" #include "compatibility/5.1.0.h"
#include "compatibility/5.0.0.h" #include "compatibility/5.0.0.h"
#include "compatibility/5.x.x.h" #include "compatibility/5.x.x.h"
#include "compatibility/5.x.x.inl" #include "compatibility/5.x.x.inl"
#ifdef __cplusplus #if defined(__cplusplus) && !defined(SOL_USING_CXX_LUA)
} }
#endif #endif
#endif // C++ Mangling for Lua
#endif // SOL_NO_COMPAT #endif // SOL_NO_COMPAT
#endif // SOL_COMPATIBILITY_HPP #endif // SOL_COMPATIBILITY_HPP

View File

@ -27,7 +27,6 @@
#if SOL_LUA_VERSION == 501 #if SOL_LUA_VERSION == 501
/* Lua 5.1 */ /* Lua 5.1 */
#include <lua.hpp>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -21,6 +21,7 @@
#ifndef SOL_5_2_0_H #ifndef SOL_5_2_0_H
#define SOL_5_2_0_H #define SOL_5_2_0_H
#include "version.hpp" #include "version.hpp"
#if SOL_LUA_VERSION < 503 #if SOL_LUA_VERSION < 503

View File

@ -28,7 +28,7 @@
#include "5.0.0.h" #include "5.0.0.h"
#include "5.x.x.h" #include "5.x.x.h"
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM == 501 #if SOL_LUA_VERSION < 502
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>

View File

@ -28,7 +28,7 @@
#include <lauxlib.h> #include <lauxlib.h>
#else #else
#include <lua.hpp> #include <lua.hpp>
#endif // C++ Mangming for Lua #endif // C++ Mangling for Lua
#if defined(_WIN32) || defined(_MSC_VER) #if defined(_WIN32) || defined(_MSC_VER)
#ifndef SOL_CODECVT_SUPPORT #ifndef SOL_CODECVT_SUPPORT