Developer

API Reference

ILuaEx_PushCClosure()

Brew Release
Brew MP 1.0.2
See Also
AEELuaCFunction, ILuaEx_ToCFunction(), ILuaEx_OpenLib()
Description
Pushes a new C closure onto the stack. Upvalues may be associated with a C function, and must be on the stack prior to calling this function. They will then be popped, leaving the closure at the top of the stack.
Parameters
  • pif
    []:
    a pointer to the ILuaEx object
  • pfn
    []:
    a pointer to the C function
  • nUpvals
    []:
    number of upvalues to associate with this closure instance. The upvalues must already be at the top of the stack and will popped off prior to the function being pushed. The maximum value is 255.
Interface
Prototype
   void ILuaEx_PushCClosure(ILuaEx *pif, AEELuaCFunction pfn, int nUpvals)

   static __inline void ILuaEx_PushCFunction(ILuaEx *pif, AEELuaCFunction f) {
      ILuaEx_PushCClosure(pif, f, 0);
   }
  • Follow