| 631 | |
| 632 | |
| 633 | static int ll_module (lua_State *L) { |
| 634 | const char *modname = luaL_checkstring(L, 1); |
| 635 | int lastarg = lua_gettop(L); /* last parameter */ |
| 636 | luaL_pushmodule(L, modname, 1); /* get/create module table */ |
| 637 | /* check whether table already has a _NAME field */ |
| 638 | if (lua_getfield(L, -1, "_NAME") != LUA_TNIL) |
| 639 | lua_pop(L, 1); /* table is an initialized module */ |
| 640 | else { /* no; initialize it */ |
| 641 | lua_pop(L, 1); |
| 642 | modinit(L, modname); |
| 643 | } |
| 644 | lua_pushvalue(L, -1); |
| 645 | set_env(L); |
| 646 | dooptions(L, lastarg); |
| 647 | return 1; |
| 648 | } |
| 649 | |
| 650 | |
| 651 | static int ll_seeall (lua_State *L) { |
nothing calls this directly
no test coverage detected