aboutsummaryrefslogtreecommitdiff
path: root/src/tools.c
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2015-03-23 11:56:00 +0300
committermpeterv <mpeterval@gmail.com>2015-04-12 18:35:13 +0300
commitc5856f320cc5f5df78f8deb92b2a1186b9363a8e (patch)
tree92bb6ec264881894023d080340236c179f30d6be /src/tools.c
parent4f51dbba76b5a486d6935c2b9a2ac9086b9ea64e (diff)
downloadlanes-c5856f320cc5f5df78f8deb92b2a1186b9363a8e.tar.gz
lanes-c5856f320cc5f5df78f8deb92b2a1186b9363a8e.tar.bz2
lanes-c5856f320cc5f5df78f8deb92b2a1186b9363a8e.zip
Fix standard library lists for Lua 5.3
Fixes crash on require under Lua 5.3 without LUA_COMPAT_5_2. Fixes utf8 library not loaded under Lua 5.3.
Diffstat (limited to 'src/tools.c')
-rw-r--r--src/tools.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools.c b/src/tools.c
index 5350e75..3a19605 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -194,8 +194,13 @@ static const luaL_Reg libs[] =
194 { LUA_OSLIBNAME, luaopen_os}, 194 { LUA_OSLIBNAME, luaopen_os},
195 { LUA_IOLIBNAME, luaopen_io}, 195 { LUA_IOLIBNAME, luaopen_io},
196#endif // PLATFORM_XBOX 196#endif // PLATFORM_XBOX
197#if LUA_VERSION_NUM >= 503
198 { LUA_UTF8LIBNAME, luaopen_utf8},
199#endif
197#if LUA_VERSION_NUM >= 502 200#if LUA_VERSION_NUM >= 502
201#ifdef luaopen_bit32
198 { LUA_BITLIBNAME, luaopen_bit32}, 202 { LUA_BITLIBNAME, luaopen_bit32},
203#endif
199 { LUA_COLIBNAME, luaopen_coroutine}, // Lua 5.2: coroutine is no longer a part of base! 204 { LUA_COLIBNAME, luaopen_coroutine}, // Lua 5.2: coroutine is no longer a part of base!
200#else // LUA_VERSION_NUM 205#else // LUA_VERSION_NUM
201 { LUA_COLIBNAME, NULL}, // Lua 5.1: part of base package 206 { LUA_COLIBNAME, NULL}, // Lua 5.1: part of base package