| 603 | |
| 604 | |
| 605 | LUA_API void lua_getglobal (lua_State *L, const char *var) { |
| 606 | Table *reg = hvalue(&G(L)->l_registry); |
| 607 | const TValue *gt; /* global table */ |
| 608 | lua_lock(L); |
| 609 | gt = luaH_getint(reg, LUA_RIDX_GLOBALS); |
| 610 | setsvalue2s(L, L->top++, luaS_new(L, var)); |
| 611 | luaV_gettable(L, gt, L->top - 1, L->top - 1); |
| 612 | lua_unlock(L); |
| 613 | } |
| 614 | |
| 615 | |
| 616 | LUA_API void lua_gettable (lua_State *L, int idx) { |
no test coverage detected