/* In Lua 5.3 luac.cross generates a top level Proto for each source file with one upvalue that must be the set to the _ENV variable when its closure is created, and as such this parallels some ldo.c processing.  */
LUA_API int() lua_pushlfsfunc(lua_State *L)
/* In Lua 5.3 luac.cross generates a top level Proto for each source file with one upvalue that must be the set to the _ENV variable when its closure is created, and as such this parallels some ldo.c processing.  */
LUA_API int() lua_pushlfsfunc(lua_State *L)
{
    const TValue *v = luaH_getstr (hvalue(t), tsvalue(L->top-1));
    if (ttislightuserdata(v)) {
      Proto *f = pvalue(v);   
      LClosure *cl = luaF_newLclosure(L, f->sizeupvalues);
      setclLvalue(L, L->top-1, cl);
      luaF_initupvals(L, cl);
      cl->p = f;
      if (cl->nupvalues >= 1) {
        UpVal *uv1 = cl->upvals[0];
        TValue *val = uv1->v;
        setobj(L, val, luaH_getint(hvalue(&G(L)->l_registry), LUA_RIDX_GLOBALS));
        luaC_upvalbarrier(L, uv1);
      }
      return 1;
    }
  }
  setnilvalue(L->top-1);
  lua_unlock(L);
  return 0;
}