| 628 | |
| 629 | |
| 630 | LUA_API int lua_geti(lua_State *L, int idx, lua_Integer n) { |
| 631 | StkId t; |
| 632 | const TValue *aux; |
| 633 | lua_lock(L); |
| 634 | t = index2addr(L, idx); |
| 635 | if (luaV_fastget(L, t, n, aux, luaH_getint)) { |
| 636 | setobj2s(L, L->top, aux); |
| 637 | api_incr_top(L); |
| 638 | } |
| 639 | else { |
| 640 | setivalue(L->top, n); |
| 641 | api_incr_top(L); |
| 642 | luaV_finishget(L, t, L->top - 1, L->top - 1, aux); |
| 643 | } |
| 644 | lua_unlock(L); |
| 645 | return ttnov(L->top - 1); |
| 646 | } |
| 647 | |
| 648 | |
| 649 | LUA_API int lua_rawget(lua_State *L, int idx) { |
no test coverage detected