| 2623 | } |
| 2624 | |
| 2625 | COMPAT53_API int luaL_getsubtable(lua_State *L, int i, const char *name) { |
| 2626 | int abs_i = lua_absindex(L, i); |
| 2627 | luaL_checkstack(L, 3, "not enough stack slots"); |
| 2628 | lua_pushstring(L, name); |
| 2629 | lua_gettable(L, abs_i); |
| 2630 | if (lua_istable(L, -1)) |
| 2631 | return 1; |
| 2632 | lua_pop(L, 1); |
| 2633 | lua_newtable(L); |
| 2634 | lua_pushstring(L, name); |
| 2635 | lua_pushvalue(L, -2); |
| 2636 | lua_settable(L, abs_i); |
| 2637 | return 0; |
| 2638 | } |
| 2639 | |
| 2640 | COMPAT53_API lua_Integer luaL_len(lua_State *L, int i) { |
| 2641 | lua_Integer res = 0; |
no test coverage detected