** function to be used with macro "fasttm": optimized for absence of ** tag methods */
| 48 | ** tag methods |
| 49 | */ |
| 50 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { |
| 51 | const TValue *tm = luaH_getstr(events, ename); |
| 52 | lua_assert(event <= TM_EQ); |
| 53 | if (ttisnil(tm)) { /* no tag method? */ |
| 54 | events->flags |= cast_byte(1u<<event); /* cache this fact */ |
| 55 | return NULL; |
| 56 | } |
| 57 | else return tm; |
| 58 | } |
| 59 | |
| 60 | |
| 61 | const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { |
nothing calls this directly
no test coverage detected