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