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

Function lua_pushcclosure

freebsd/contrib/openzfs/module/lua/lapi.c:552–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550
551
552LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
553 lua_lock(L);
554 if (n == 0) {
555 setfvalue(L->top, fn);
556 }
557 else {
558 Closure *cl;
559 api_checknelems(L, n);
560 api_check(L, n <= MAXUPVAL, "upvalue index too large");
561 luaC_checkGC(L);
562 cl = luaF_newCclosure(L, n);
563 cl->c.f = fn;
564 L->top -= n;
565 while (n--)
566 setobj2n(L, &cl->c.upvalue[n], L->top + n);
567 setclCvalue(L, L->top, cl);
568 }
569 api_incr_top(L);
570 lua_unlock(L);
571}
572
573
574LUA_API void lua_pushboolean (lua_State *L, int b) {

Callers 13

str_gmatchFunction · 0.70
luaL_setfuncsFunction · 0.70
luaB_cowrapFunction · 0.70
zcp_load_get_libFunction · 0.50
zcp_evalFunction · 0.50
zcp_load_synctask_libFunction · 0.50
zcp_clones_listFunction · 0.50
zcp_snapshots_listFunction · 0.50
zcp_children_listFunction · 0.50
zcp_user_props_listFunction · 0.50
zcp_bookmarks_listFunction · 0.50
zcp_holds_listFunction · 0.50

Calls 1

luaF_newCclosureFunction · 0.70

Tested by

no test coverage detected