MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / getcurrenv

Function getcurrenv

lua/lapi.c:80–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80static Table *getcurrenv (lua_State *L) {
81 if (L->ci == L->base_ci) /* no enclosing function? */
82 return hvalue(gt(L)); /* use global table as environment */
83 else {
84 Closure *func = curr_func(L);
85 return func->c.env;
86 }
87}
88
89
90void luaA_pushobject (lua_State *L, const TValue *o) {

Callers 3

lua_pushcclosureFunction · 0.85
f_CcallFunction · 0.85
lua_newuserdataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected