* Resolve the field name in UPVAL_FIELDTABLE, die if not found. */
| 417 | * Resolve the field name in UPVAL_FIELDTABLE, die if not found. |
| 418 | */ |
| 419 | static void lookup_field(lua_State *state, int index, const char *mode) |
| 420 | { |
| 421 | lua_pushvalue(state, index); |
| 422 | lua_gettable(state, UPVAL_FIELDTABLE); // uses metatable with enum keys |
| 423 | |
| 424 | if (lua_isnil(state, -1)) |
| 425 | field_error(state, index, "not found", mode); |
| 426 | } |
| 427 | |
| 428 | // Resolve the field in the metatable and return |
| 429 | static int get_metafield(lua_State *state) |
no test coverage detected