Developer

API Reference

ILuaDebug_SetUpvalue()

Brew Release
Brew MP 1.0.2
See Also
ILuaDebug_GetUpvalue(), Lua_UpValueIndex()
Description
Pops a value from the Lua stack and sets it as the value of a closure's upvalue.
Parameters
  • pif
    []:
    a pointer to the ILuaDebug interface
  • nFuncIdx
    []:
    the index of the closure on the Lua stack
  • nUpvalIdx
    []:
    the (1-based) index of the upvalue to set. Note that upvalues are numbered in arbitrary order.
  • ppszName
    []:
    output pointer set to the upvalue variable's name. For C functions this will always point to the empty string "".
Interface
Prototype
   int ILuaDebug_SetUpvalue(ILuaDebug *pif, int nFuncIdx,
                            int nUpvalIdx, const char **ppszName);
Return
AEE_SUCCESS if there are no errors, otherwise AEE_EFAILED if nUpvalIdx is greater than the number of upvalues.
  • Follow