| 699 | |
| 700 | |
| 701 | static int ll_module (lua_State *L) { |
| 702 | const char *modname = luaL_checkstring(L, 1); |
| 703 | int lastarg = lua_gettop(L); /* last parameter */ |
| 704 | luaL_pushmodule(L, modname, 1); /* get/create module table */ |
| 705 | /* check whether table already has a _NAME field */ |
| 706 | if (lua_getfield(L, -1, "_NAME") != LUA_TNIL) |
| 707 | lua_pop(L, 1); /* table is an initialized module */ |
| 708 | else { /* no; initialize it */ |
| 709 | lua_pop(L, 1); |
| 710 | modinit(L, modname); |
| 711 | } |
| 712 | lua_pushvalue(L, -1); |
| 713 | set_env(L); |
| 714 | dooptions(L, lastarg); |
| 715 | return 1; |
| 716 | } |
| 717 | |
| 718 | |
| 719 | static int ll_seeall (lua_State *L) { |
nothing calls this directly
no test coverage detected