| 669 | |
| 670 | |
| 671 | static int ll_module (lua_State *L) { |
| 672 | const char *modname = luaL_checkstring(L, 1); |
| 673 | int lastarg = lua_gettop(L); /* last parameter */ |
| 674 | luaL_pushmodule(L, modname, 1); /* get/create module table */ |
| 675 | /* check whether table already has a _NAME field */ |
| 676 | if (lua_getfield(L, -1, "_NAME") != LUA_TNIL) |
| 677 | lua_pop(L, 1); /* table is an initialized module */ |
| 678 | else { /* no; initialize it */ |
| 679 | lua_pop(L, 1); |
| 680 | modinit(L, modname); |
| 681 | } |
| 682 | lua_pushvalue(L, -1); |
| 683 | set_env(L); |
| 684 | dooptions(L, lastarg); |
| 685 | return 1; |
| 686 | } |
| 687 | |
| 688 | |
| 689 | static int ll_seeall (lua_State *L) { |
nothing calls this directly
no test coverage detected