Developer

API Reference

ILuaLib_Init()

Brew Release
Brew MP 1.0.2
See Also
ILua_PushILuaFunction(), ILuaEx_PushCClosure(), ILuaEx_RegisterLib(), ILuaEx_Register()
Description
Invoked when the library is first instantiated and serves as the entry point for any initialization needed to be done, such as registering a table of functions.
Parameters
  • pif
    []:
    pointer to the ILuaLib interface being initialized
  • piLua
    []:
    pointer to the ILua VM instance that instantiated this library. It is recommended that your class does not AddRef this pointer, as that may lead to a circular reference.
  • pnNumRet
    []:
    pointer to an integer set on output to the number of items left on piLua's stack by this function. Usually this is 1, as a table of functions is often left to be returned directly to "require". Other times a library can return 0, if a library itself loads a function table into the global namespace and does not want to return anything directly.
Interface
Prototype
   AEEResult ILuaLib_Init(ILuaLib *pif, ILua *piLua, int *pnNumRet)
  • Follow