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