| 840 | |
| 841 | |
| 842 | LUALIB_API void luaL_openlib (lua_State *L, const char *libname, |
| 843 | const luaL_Reg *l, int nup) { |
| 844 | luaL_checkversion(L); |
| 845 | if (libname) { |
| 846 | luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ |
| 847 | lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ |
| 848 | } |
| 849 | if (l) |
| 850 | luaL_setfuncs(L, l, nup); |
| 851 | else |
| 852 | lua_pop(L, nup); /* remove upvalues */ |
| 853 | } |
| 854 | |
| 855 | #endif |
| 856 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected