Merge pull request #165 from OrfeasZ/utf8-lib-support

Support for Lua 5.3 UTF8 Library
This commit is contained in:
The Phantom Derpstorm 2016-08-06 10:21:07 -04:00 committed by GitHub
commit 0dcc879ce6

View File

@ -41,6 +41,7 @@ namespace sol {
io, io,
ffi, ffi,
jit, jit,
utf8,
count count
}; };
@ -183,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);