| 713 | |
| 714 | |
| 715 | static int ll_module(lua_State *L) { |
| 716 | const char *modname = luaL_checkstring(L, 1); |
| 717 | int lastarg = lua_gettop(L); /* last parameter */ |
| 718 | luaL_pushmodule(L, modname, 1); /* get/create module table */ |
| 719 | /* check whether table already has a _NAME field */ |
| 720 | if (lua_getfield(L, -1, "_NAME") != LUA_TNIL) |
| 721 | lua_pop(L, 1); /* table is an initialized module */ |
| 722 | else { /* no; initialize it */ |
| 723 | lua_pop(L, 1); |
| 724 | modinit(L, modname); |
| 725 | } |
| 726 | lua_pushvalue(L, -1); |
| 727 | set_env(L); |
| 728 | dooptions(L, lastarg); |
| 729 | return 1; |
| 730 | } |
| 731 | |
| 732 | |
| 733 | static int ll_seeall(lua_State *L) { |
nothing calls this directly
no test coverage detected