MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / getcurrenv

Function getcurrenv

deps/lua/src/lapi.c:79–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79static Table *getcurrenv (lua_State *L) {
80 if (L->ci == L->base_ci) /* no enclosing function? */
81 return hvalue(gt(L)); /* use global table as environment */
82 else {
83 Closure *func = curr_func(L);
84 return func->c.env;
85 }
86}
87
88
89void 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