mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Unfortunately, exceptions require some overhead in luajit... overhead we can't always accept on behalf of the user.
This commit is contained in:
parent
3f681eea0d
commit
1341aafa27
|
@ -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<int>(functable.size()));
|
||||
int up = stack::stack_detail::push_upvalues(L, funcs);
|
||||
luaL_setfuncs(L, functable.data(), up);
|
||||
lua_setfield(L, metatableindex, "__index");
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user