[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Modifying a Closure in 5.0 Alpha
- From: "Peter Loveday" <peter@...>
- Date: Thu, 22 Aug 2002 18:48:33 -0400
lua_pushupvalues pushes the upvalues of the currently active C function.
> And in that case it would be much easier to use
> lua_replace(L, lua_upvalueindex(x));
> You cannot _add_ new upvalues with lua_replace but you can change them
> (add some nil-upvalues initially...).
Right, unfortunately I need to add (or replace, if I added a nil, as you
the values on an existing function. I'm not within this function, nor do I
to call it right now. When I initially create the Closure, I don't have any
way to tell if I will later need to add an upvalue or not. I guess I might
to add a function within Lua to do it.
Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software