diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2015-04-14 16:46:02 +0200 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2015-04-14 16:46:02 +0200 |
commit | a4e2a434cbbc7243638d0451cbf38c3b5a14910a (patch) | |
tree | 92bb6ec264881894023d080340236c179f30d6be | |
parent | 4f51dbba76b5a486d6935c2b9a2ac9086b9ea64e (diff) | |
parent | c5856f320cc5f5df78f8deb92b2a1186b9363a8e (diff) | |
download | lanes-a4e2a434cbbc7243638d0451cbf38c3b5a14910a.tar.gz lanes-a4e2a434cbbc7243638d0451cbf38c3b5a14910a.tar.bz2 lanes-a4e2a434cbbc7243638d0451cbf38c3b5a14910a.zip |
Merge pull request #118 from mpeterv/fix-libs
Fix standard library lists for Lua 5.3
-rw-r--r-- | src/lanes.lua | 1 | ||||
-rw-r--r-- | src/tools.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index 210f325..5df406a 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -216,6 +216,7 @@ local valid_libs = | |||
216 | ["math"] = true, | 216 | ["math"] = true, |
217 | ["debug"] = true, | 217 | ["debug"] = true, |
218 | ["bit32"] = true, -- Lua 5.2 only, ignored silently under 5.1 | 218 | ["bit32"] = true, -- Lua 5.2 only, ignored silently under 5.1 |
219 | ["utf8"] = true, -- Lua 5.3 only, ignored silently under 5.1 and 5.2 | ||
219 | -- | 220 | -- |
220 | ["base"] = true, | 221 | ["base"] = true, |
221 | ["coroutine"] = true, -- part of "base" in Lua 5.1 | 222 | ["coroutine"] = true, -- part of "base" in Lua 5.1 |
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 |