** function to be used with macro "fasttm": optimized for absence of ** tag methods */
| 9876 | ** tag methods |
| 9877 | */ |
| 9878 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { |
| 9879 | const TValue *tm = luaH_getstr(events, ename); |
| 9880 | lua_assert(event <= TM_EQ); |
| 9881 | if (ttisnil(tm)) { /* no tag method? */ |
| 9882 | events->flags |= cast_byte(1u<<event); /* cache this fact */ |
| 9883 | return NULL; |
| 9884 | } |
| 9885 | else return tm; |
| 9886 | } |
| 9887 | |
| 9888 | |
| 9889 | const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { |
nothing calls this directly
no test coverage detected