lua-users home
lua-l archive

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


>So I either need a means to add an extra value to the existing closure, or
>query the previously pushed function and values, then re-push it all with an
>extra one.

Use lua_pushupvalues to get all upvalues in the stack and lua_tocfunction to
get the C function back and then create a new closure as needed.
--lhf