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