API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ILUADEBUG_GETUPVALUE()

Brew Release
Brew MP 1.0.2
See Also
ILuaDebug_SetUpvalue(), Lua_UpValueIndex()
Description
Gets information about a closure's upvalue, which are the external local variables a Lua function uses. The upvalue's value is pushed onto the Lua stack.
Params
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 retrieve. 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_GetUpvalue(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.