| 101 | |
| 102 | |
| 103 | void 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 | |
| 119 | void luaT_callTMres (lua_State *L, const TValue *f, const TValue *p1, |
no test coverage detected