MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaT_gettm

Function luaT_gettm

Source/Misc/lua/src/lua.c:9878–9886  ·  view source on GitHub ↗

** function to be used with macro "fasttm": optimized for absence of ** tag methods */

Source from the content-addressed store, hash-verified

9876** tag methods
9877*/
9878const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
9879const TValue *tm = luaH_getstr(events, ename);
9880lua_assert(event <= TM_EQ);
9881if (ttisnil(tm)) { /* no tag method? */
9882events->flags |= cast_byte(1u<<event); /* cache this fact */
9883return NULL;
9884}
9885else return tm;
9886}
9887
9888
9889const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {

Callers

nothing calls this directly

Calls 1

luaH_getstrFunction · 0.85

Tested by

no test coverage detected