MCPcopy Create free account
hub / github.com/defold/defold / f_Ccall

Function f_Ccall

engine/lua/src/lua/lapi.c:837–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835
836
837static void f_Ccall (lua_State *L, void *ud) {
838 struct CCallS *c = cast(struct CCallS *, ud);
839 Closure *cl;
840 cl = luaF_newCclosure(L, 0, getcurrenv(L));
841 cl->c.f = c->func;
842 setclvalue(L, L->top, cl); /* push function */
843 api_incr_top(L);
844 setpvalue(L->top, c->ud); /* push only argument */
845 api_incr_top(L);
846 luaD_call(L, L->top - 2, 0);
847}
848
849
850LUA_API int lua_cpcall (lua_State *L, lua_CFunction func, void *ud) {

Callers

nothing calls this directly

Calls 3

luaF_newCclosureFunction · 0.85
getcurrenvFunction · 0.85
luaD_callFunction · 0.85

Tested by

no test coverage detected