@ -8,7 +8,7 @@ local tmpfs = computer.tmpAddress()
--prefix 'k' (for kernel) on any functions userspace will also have a version of to ensure kernelspace
--prefix 'k' (for kernel) on any functions userspace will also have a version of to ensure kernelspace
--function usage is intentional (ie prevent accidentally using the kernel's `load` in a userspace `loadfile`)
--function usage is intentional (ie prevent accidentally using the kernel's `load` in a userspace `loadfile`)
local envBase = _G --used for creating process environments
local envBase = _G --used for creating process environments
local assert , checkArg , error , kload , ipairs , next , pairs , rawequal , rawset , se tmetatable, tostring , type = assert , checkArg , error , load , ipairs , next , pairs , rawequal , rawse t, setmetatable , tostring , type
local assert , checkArg , error , kload , ipairs , next , pairs , rawequal , rawset , se lect, se tmetatable, tostring , type = assert , checkArg , error , load , ipairs , next , pairs , rawequal , rawse t, selec t, setmetatable , tostring , type
local invoke , component_type = component.invoke , component.type
local invoke , component_type = component.invoke , component.type
local kpullSignal , shutdown , uptime = computer.pullSignal , computer.shutdown , computer.uptime
local kpullSignal , shutdown , uptime = computer.pullSignal , computer.shutdown , computer.uptime
local co_create , co_status , kresume , kyield = coroutine.create , coroutine.status , coroutine.resume , coroutine.yield
local co_create , co_status , kresume , kyield = coroutine.create , coroutine.status , coroutine.resume , coroutine.yield
@ -38,7 +38,7 @@ local checkArgEx
do
do
-- tail-recursive varargs part of checkArgEx
-- tail-recursive varargs part of checkArgEx
local function check ( val , t , want , ... )
local function check ( val , t , want , ... )
if t == wan t then
if wan t == t then
return want
return want
elseif want == ' integer ' or want == ' float ' then
elseif want == ' integer ' or want == ' float ' then
if math_type ( val ) == want then
if math_type ( val ) == want then
@ -50,9 +50,8 @@ do
end
end
elseif not want then
elseif not want then
return nil
return nil
else
return check ( val , t , ... )
end
end
return check ( val , t , ... )
end
end
function checkArgEx ( i , val , ... )
function checkArgEx ( i , val , ... )