MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaT_gettm

Function luaT_gettm

deps/lua/src/ltm.c:50–58  ·  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

48** tag methods
49*/
50const 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
61const 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