| 825 | |
| 826 | |
| 827 | LUALIB_API void luaL_openlib (lua_State *L, const char *libname, |
| 828 | const luaL_Reg *l, int nup) { |
| 829 | luaL_checkversion(L); |
| 830 | if (libname) { |
| 831 | luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ |
| 832 | lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ |
| 833 | } |
| 834 | if (l) |
| 835 | luaL_setfuncs(L, l, nup); |
| 836 | else |
| 837 | lua_pop(L, nup); /* remove upvalues */ |
| 838 | } |
| 839 | |
| 840 | #endif |
| 841 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected