MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaT_gettm

Function luaT_gettm

freebsd/contrib/openzfs/module/lua/ltm.c:51–59  ·  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

49** tag methods
50*/
51const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
52 const TValue *tm = luaH_getstr(events, ename);
53 lua_assert(event <= TM_EQ);
54 if (ttisnil(tm)) { /* no tag method? */
55 events->flags |= cast_byte(1u<<event); /* cache this fact */
56 return NULL;
57 }
58 else return tm;
59}
60
61
62const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {

Callers

nothing calls this directly

Calls 1

luaH_getstrFunction · 0.70

Tested by

no test coverage detected