fix: remove package module load entirely, unnecessary
This commit is contained in:
parent
9a531a8945
commit
fa74ffa10f
@ -105,7 +105,6 @@ func (pl *lStatePool) New() *lua.LState {
|
|||||||
moduleName string
|
moduleName string
|
||||||
moduleFn lua.LGFunction
|
moduleFn lua.LGFunction
|
||||||
}{
|
}{
|
||||||
{lua.LoadLibName, lua.OpenPackage},
|
|
||||||
{lua.BaseLibName, openBaseSubset},
|
{lua.BaseLibName, openBaseSubset},
|
||||||
{lua.TabLibName, lua.OpenTable},
|
{lua.TabLibName, lua.OpenTable},
|
||||||
{lua.MathLibName, lua.OpenMath},
|
{lua.MathLibName, lua.OpenMath},
|
||||||
@ -124,9 +123,6 @@ func (pl *lStatePool) New() *lua.LState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set package module to Nil so loaders can't be accessed
|
|
||||||
L.SetGlobal("package", lua.LNil)
|
|
||||||
|
|
||||||
getArgs := func(ls *lua.LState) (evalCmd string, args []string) {
|
getArgs := func(ls *lua.LState) (evalCmd string, args []string) {
|
||||||
evalCmd = ls.GetGlobal("EVAL_CMD").String()
|
evalCmd = ls.GetGlobal("EVAL_CMD").String()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user