| 916 | |
| 917 | |
| 918 | LUALIB_API void luaL_openlib (lua_State *L, const char *libname, |
| 919 | const luaL_Reg *l, int nup) { |
| 920 | luaL_checkversion(L); |
| 921 | if (libname) { |
| 922 | luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ |
| 923 | lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ |
| 924 | } |
| 925 | if (l) |
| 926 | luaL_setfuncs(L, l, nup); |
| 927 | else |
| 928 | lua_pop(L, nup); /* remove upvalues */ |
| 929 | } |
| 930 | |
| 931 | #endif |
| 932 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected