lua-users home
lua-l archive

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


lua_pushupvalues pushes the upvalues of the currently active C function.
> And in that case it would be much easier to use
>
>   lua_push<something>
>   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
say)
the values on an existing function.  I'm not within this function, nor do I
want
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
have
to add a function within Lua to do it.


Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software