** function to be used with macro "fasttm": optimized for absence of ** tag methods */
| 58 | ** tag methods |
| 59 | */ |
| 60 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { |
| 61 | const TValue *tm = luaH_getshortstr(events, ename); |
| 62 | lua_assert(event <= TM_EQ); |
| 63 | if (notm(tm)) { /* no tag method? */ |
| 64 | events->flags |= cast_byte(1u<<event); /* cache this fact */ |
| 65 | return NULL; |
| 66 | } |
| 67 | else return tm; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { |
nothing calls this directly
no test coverage detected