| 2913 | |
| 2914 | |
| 2915 | LUALIB_API void luaL_openlib(lua_State *L, const char *libname, |
| 2916 | const luaL_Reg *l, int nup) { |
| 2917 | luaL_checkversion(L); |
| 2918 | if (libname) { |
| 2919 | luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ |
| 2920 | lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ |
| 2921 | } |
| 2922 | if (l) |
| 2923 | luaL_setfuncs(L, l, nup); |
| 2924 | else |
| 2925 | lua_pop(L, nup); /* remove upvalues */ |
| 2926 | } |
| 2927 | |
| 2928 | #endif |
| 2929 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected