aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.lua')
-rw-r--r--src/lanes.lua30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/lanes.lua b/src/lanes.lua
index f4eef81..729116e 100644
--- a/src/lanes.lua
+++ b/src/lanes.lua
@@ -52,7 +52,7 @@ lanes.configure = function( _params)
52 end 52 end
53 53
54 -- 54 --
55 -- Cache globals for code that might run under sandboxing 55 -- Cache globals for code that might run under sandboxing
56 -- 56 --
57 local assert = assert 57 local assert = assert
58 local string_gmatch = assert( string.gmatch) 58 local string_gmatch = assert( string.gmatch)
@@ -199,18 +199,20 @@ end
199-- and call the generator later (maybe multiple times, with different parameters) 199-- and call the generator later (maybe multiple times, with different parameters)
200-- or add on actual thread arguments to also ignite the thread on the same call. 200-- or add on actual thread arguments to also ignite the thread on the same call.
201 201
202local valid_libs= { 202local valid_libs=
203 ["package"]= true, 203{
204 ["table"]= true, 204 ["package"] = true,
205 ["io"]= true, 205 ["table"] = true,
206 ["os"]= true, 206 ["io"] = true,
207 ["string"]= true, 207 ["os"] = true,
208 ["math"]= true, 208 ["string"] = true,
209 ["debug"]= true, 209 ["math"] = true,
210 ["bit32"]= true, -- Lua 5.2 only, ignored silently under 5.1 210 ["debug"] = true,
211 -- 211 ["bit32"] = true, -- Lua 5.2 only, ignored silently under 5.1
212 ["base"]= true, 212 --
213 ["coroutine"]= true 213 ["base"] = true,
214 ["coroutine"] = true, -- part of "base" in Lua 5.1
215 ["lanes.core"] = true
214} 216}
215 217
216-- PUBLIC LANES API 218-- PUBLIC LANES API
@@ -253,7 +255,7 @@ local function gen( ... )
253 if libs and libs ~= "*" then 255 if libs and libs ~= "*" then
254 local found = {} 256 local found = {}
255 -- check that the caller only provides reserved library names 257 -- check that the caller only provides reserved library names
256 for s in string_gmatch(libs, "[%a%d]+") do 258 for s in string_gmatch(libs, "[%a%d.]+") do
257 if not valid_libs[s] then 259 if not valid_libs[s] then
258 error( "Bad library name: " .. s) 260 error( "Bad library name: " .. s)
259 else 261 else