Better handling so we have 100% coverage of switch options.

This commit is contained in:
OrfeasZ 2016-08-06 16:54:08 +03:00
parent 7d6276448b
commit 373251c9e1

View File

@ -149,12 +149,6 @@ namespace sol {
lua_pop(L, 1); lua_pop(L, 1);
#endif // Lua 5.2+ only #endif // Lua 5.2+ only
break; break;
case lib:utf8:
#if SOL_LUA_VERSION > 502
luaL_requiref(L, "utf8", luaopen_utf8, 1);
lua_pop(L, 1);
#endif // Lua 5.3+ only
break;
#endif // Not LuaJIT #endif // Not LuaJIT
case lib::string: case lib::string:
luaL_requiref(L, "string", luaopen_string, 1); luaL_requiref(L, "string", luaopen_string, 1);
@ -190,6 +184,12 @@ namespace sol {
luaL_requiref(L, "debug", luaopen_debug, 1); luaL_requiref(L, "debug", luaopen_debug, 1);
lua_pop(L, 1); lua_pop(L, 1);
break; break;
case lib:utf8:
#if SOL_LUA_VERSION > 502 && !defined(SOL_LUAJIT)
luaL_requiref(L, "utf8", luaopen_utf8, 1);
lua_pop(L, 1);
#endif // Lua 5.3+ only
break;
case lib::ffi: case lib::ffi:
#ifdef SOL_LUAJIT #ifdef SOL_LUAJIT
luaL_requiref(L, "ffi", luaopen_ffi, 1); luaL_requiref(L, "ffi", luaopen_ffi, 1);