diff --git a/sol/usertype.hpp b/sol/usertype.hpp index afd24496..a97ab5aa 100644 --- a/sol/usertype.hpp +++ b/sol/usertype.hpp @@ -144,7 +144,7 @@ inline void push_metatable(lua_State* L, bool needsindexfunction, Funcs&& funcs, } // Otherwise, we use quick, fast table indexing for methods // gives us performance boost in calling them - lua_createtable(L, 0, functable.size()); + lua_createtable(L, 0, static_cast(functable.size())); int up = stack::stack_detail::push_upvalues(L, funcs); luaL_setfuncs(L, functable.data(), up); lua_setfield(L, metatableindex, "__index"); diff --git a/tests.cpp b/tests.cpp index 1af1c087..63f941ce 100644 --- a/tests.cpp +++ b/tests.cpp @@ -1162,6 +1162,7 @@ TEST_CASE("interop/null-to-nil-and-back", "nil should be the given type when a p "assert(x == nil)")); } +#ifdef SOL_LUAJIT // LuaJIT does not have error message handling support for lua_pcall, and thus this test will always fail TEST_CASE( "functions/function_result-protected_function", "Function result should be the beefy return type for sol::function that allows for error checking and error handlers" ) { sol::state lua; lua.open_libraries( sol::lib::base, sol::lib::debug ); @@ -1209,6 +1210,7 @@ TEST_CASE( "functions/function_result-protected_function", "Function result shou errorstring = result2; REQUIRE(errorstring == errormessage2); } +#endif // LuaJIT Issues TEST_CASE("functions/destructor-tests", "Show that proper copies / destruction happens") { static int created = 0;