| 5257 | DISABLE_WARNING_UNREACHABLE_CODE |
| 5258 | |
| 5259 | staticfn lua_Integer |
| 5260 | get_table_intarray_entry(lua_State *L, int tableidx, int entrynum) |
| 5261 | { |
| 5262 | lua_Integer ret = 0; |
| 5263 | if (tableidx < 0) |
| 5264 | tableidx--; |
| 5265 | |
| 5266 | lua_pushinteger(L, entrynum); |
| 5267 | lua_gettable(L, tableidx); |
| 5268 | if (lua_isnumber(L, -1)) { |
| 5269 | ret = lua_tointeger(L, -1); |
| 5270 | } else { |
| 5271 | char buf[BUFSZ]; |
| 5272 | |
| 5273 | Sprintf(buf, "Array entry #%i is %s, expected number", |
| 5274 | 1, luaL_typename(L, -1)); |
| 5275 | nhl_error(L, buf); |
| 5276 | } |
| 5277 | lua_pop(L, 1); |
| 5278 | return ret; |
| 5279 | } |
| 5280 | |
| 5281 | staticfn int |
| 5282 | get_table_region( |
no test coverage detected