Add modlib._RG for raw global access

This commit is contained in:
Lars Mueller 2021-01-17 18:03:42 +01:00
parent b09ba18421
commit 1e10ab0270

@ -52,7 +52,14 @@ local function loadfile_exports(filename)
return env
end
modlib = {}
modlib = {_RG = setmetatable({}, {
__index = function(_, index)
return rawget(_G, index)
end,
__newindex = function(_, index, value)
return rawset(_G, index, value)
end
})}
for _, component in ipairs{
"mod",