lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I was selectively loading different libraries using luaopen_* functions. But I receive an error : PANIC: unprotected error in call to Lua API (no calling environment) when I use luaopen_io.
After some search I found out that it is probably due to this : http://www.lua.org/manual/5.1/manual.html#7.3 .


But I want selectively allow different libraries in the lua environment. How can this be achieved ?

Is the following approach okay :
to remove library io
executing the statement io=nil

Also I want strict control over what require keyword can load. So does this imply, that I need to change lua code, and if so where ?


-Abhinav