New function 'luaL_openselectedlibs'

Makes it easier to start Lua with only some standard libraries.
This commit is contained in:
Roberto Ierusalimschy
2022-12-07 15:12:52 -03:00
parent 0270c204c2
commit d738c8d18b
7 changed files with 85 additions and 83 deletions

View File

@@ -694,7 +694,7 @@ else
T.testC(state, "settop 0")
T.loadlib(state)
T.loadlib(state, 1 | 2) -- load _G and 'package'
assert(T.doremote(state, [[
coroutine = require'coroutine';