| 717 | |
| 718 | |
| 719 | static int ll_seeall (lua_State *L) { |
| 720 | luaL_checktype(L, 1, LUA_TTABLE); |
| 721 | if (!lua_getmetatable(L, 1)) { |
| 722 | lua_createtable(L, 0, 1); /* create new metatable */ |
| 723 | lua_pushvalue(L, -1); |
| 724 | lua_setmetatable(L, 1); |
| 725 | } |
| 726 | lua_pushglobaltable(L); |
| 727 | lua_setfield(L, -2, "__index"); /* mt.__index = _G */ |
| 728 | return 0; |
| 729 | } |
| 730 | |
| 731 | #endif |
| 732 | /* }====================================================== */ |
nothing calls this directly
no test coverage detected