aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.lua')
-rw-r--r--src/lanes.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lanes.lua b/src/lanes.lua
index 005ce28..6ba0ef3 100644
--- a/src/lanes.lua
+++ b/src/lanes.lua
@@ -214,7 +214,7 @@ local function gen( ... )
214 end 214 end
215 end 215 end
216 216
217 local prio, cs, g_tbl, packagepath, packagecpath, required 217 local prio, cs, g_tbl, package_tbl, required
218 218
219 for k,v in pairs(opt) do 219 for k,v in pairs(opt) do
220 if k=="priority" then prio= v 220 if k=="priority" then prio= v
@@ -224,10 +224,8 @@ local function gen( ... )
224 type(v)=="number" and v or 224 type(v)=="number" and v or
225 error( "Bad cancelstep: "..tostring(v), lev ) 225 error( "Bad cancelstep: "..tostring(v), lev )
226 elseif k=="globals" then g_tbl= v 226 elseif k=="globals" then g_tbl= v
227 elseif k=="packagepath" then 227 elseif k=="package" then
228 packagepath = (type( v) == "string") and v or error( "Bad packagepath: " .. tostring( v), lev) 228 package_tbl = (type( v) == "table") and v or error( "Bad package: " .. tostring( v), lev)
229 elseif k=="packagecpath" then
230 packagecpath = (type( v) == "string") and v or error( "Bad packagecpath: " .. tostring( v), lev)
231 elseif k=="required" then 229 elseif k=="required" then
232 required= (type( v) == "table") and v or error( "Bad required: " .. tostring( v), lev) 230 required= (type( v) == "table") and v or error( "Bad required: " .. tostring( v), lev)
233 --.. 231 --..
@@ -236,12 +234,11 @@ local function gen( ... )
236 end 234 end
237 end 235 end
238 236
239 if not packagepath then packagepath = package.path end 237 if not package_tbl then package_tbl = package end
240 if not packagecpath then packagecpath = package.cpath end
241 -- Lane generator 238 -- Lane generator
242 -- 239 --
243 return function(...) 240 return function(...)
244 return thread_new( func, libs, cs, prio, g_tbl, packagepath, packagecpath, required, ...) -- args 241 return thread_new( func, libs, cs, prio, g_tbl, package_tbl, required, ...) -- args
245 end 242 end
246end 243end
247 244