| 681 | |
| 682 | |
| 683 | LUALIB_API void luaL_openlib (lua_State *L, const char *libname, |
| 684 | const luaL_Reg *l, int nup) { |
| 685 | luaL_checkversion(L); |
| 686 | if (libname) { |
| 687 | luaL_pushmodule(L, libname, libsize(l)); /* get/create library table */ |
| 688 | lua_insert(L, -(nup + 1)); /* move library table to below upvalues */ |
| 689 | } |
| 690 | if (l) |
| 691 | luaL_setfuncs(L, l, nup); |
| 692 | else |
| 693 | lua_pop(L, nup); /* remove upvalues */ |
| 694 | } |
| 695 | |
| 696 | #endif |
| 697 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected