lua-users home
lua-l archive

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


	Hi Marc,

It doesn't, however, address the issue I was raising since when it does a
setfenv on the function to be wrapped, it will stomp any existing
environment. In particular, I can't write:

   f1 = venv( f )
   f2 = venv( f )

And have separate environments for the functions.
	You are right.  venv() is changing the environment of the given
function.  I've just corrected that, but if the given function had an
environment different from the global, it will be ignored.  I'm still
trying to solve this...
	What I missed is if you need just the separate environments or
if you need also that the new environment inherit from the old one.

	Tomas