MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaT_gettm

Function luaT_gettm

3rd/lua-5.4.3/src/ltm.c:60–68  ·  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

58** tag methods
59*/
60const 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
71const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {

Callers

nothing calls this directly

Calls 1

luaH_getshortstrFunction · 0.85

Tested by

no test coverage detected