lua-users home
lua-l archive

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


Wim Couwenberg wrote:
There are several implicit dependencies (in 5.0.2,
didn't check 5.1w) on the C globals:

"print" needs "tostring"
"for .. in" needs "next"
"ipairs" needs "ipairs" (!)
"require" needs "LUA_PATH" and "_LOADED"

Compatibility functions lua_dofile and lua_dobuffer in
lauxlib need "_ALERT".

Indeed, adding tostring and next to the list of globals in Asko's table do the trick.

Perhaps that's one reason why most sandboxing examples defaults to the whole global table and only remove dangerous functions...
That and it is easier to do...

--
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://Phi.Lho.free.fr
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--