MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaT_callTM

Function luaT_callTM

lib/lua/src/ltm.c:103–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102
103void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
104 const TValue *p2, const TValue *p3) {
105 StkId func = L->top.p;
106 setobj2s(L, func, f); /* push function (assume EXTRA_STACK) */
107 setobj2s(L, func + 1, p1); /* 1st argument */
108 setobj2s(L, func + 2, p2); /* 2nd argument */
109 setobj2s(L, func + 3, p3); /* 3rd argument */
110 L->top.p = func + 4;
111 /* metamethod may yield only when called from Lua code */
112 if (isLuacode(L->ci))
113 luaD_call(L, func, 0);
114 else
115 luaD_callnoyield(L, func, 0);
116}
117
118
119void luaT_callTMres (lua_State *L, const TValue *f, const TValue *p1,

Callers 1

luaV_finishsetFunction · 0.85

Calls 2

luaD_callFunction · 0.85
luaD_callnoyieldFunction · 0.85

Tested by

no test coverage detected