** The following function assumes that the registry cannot be a weak ** table; so, an emergency collection while using the global table ** cannot collect it. */
| 689 | ** cannot collect it. |
| 690 | */ |
| 691 | static void getGlobalTable (lua_State *L, TValue *gt) { |
| 692 | Table *registry = hvalue(&G(L)->l_registry); |
| 693 | lu_byte tag = luaH_getint(registry, LUA_RIDX_GLOBALS, gt); |
| 694 | (void)tag; /* avoid not-used warnings when checks are off */ |
| 695 | api_check(L, novariant(tag) == LUA_TTABLE, "global table must exist"); |
| 696 | } |
| 697 | |
| 698 | |
| 699 | LUA_API int lua_getglobal (lua_State *L, const char *name) { |
no test coverage detected