MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaL_openlib

Function luaL_openlib

depends/lua/src/lauxlib.c:913–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911
912
913LUALIB_API void luaL_openlib (lua_State *L, const char *libname,
914 const luaL_Reg *l, int nup) {
915 luaL_checkversion(L);
916 if (libname) {
917 luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */
918 lua_insert(L, -(nup + 1)); /* move library table to below upvalues */
919 }
920 if (l)
921 luaL_setfuncs(L, l, nup);
922 else
923 lua_pop(L, nup); /* remove upvalues */
924}
925
926#endif
927/* }====================================================== */

Callers

nothing calls this directly

Calls 3

luaL_pushmoduleFunction · 0.85
libsizeFunction · 0.85
luaL_setfuncsFunction · 0.85

Tested by

no test coverage detected