Name
InitLibrary -- perform library initialization (V5.0)
Synopsis
int error = InitLibrary(lua_State *L);
Function
This function can be used to perform additional library initialization. Certain plugins might need to do some additional things once the lua_State has been setup correctly. For example, a plugin might want to setup some metatables or push additional helper tables into the stack. It's impossible to do such things in InitPlugin() since the lua_State isn't ready yet at InitPlugin() call time. That's why this function is available. Many plugins, however, probably don't need to do anything here at all.

InitLibrary() has to return an error code or 0 for success.

Inputs
L
pointer to the lua_State
Results
error
error code or 0 for success

Show TOC