function luaY.close_func(o,h)local W=h.L local Q=h.fs local M=Q.f o:removevars(h,0)luaK:ret(Q,0,0)M.sizecode=Q.pc M.sizelineinfo=Q.pc M.sizek=Q.nk M.sizep=Q.np M.sizelocvars=Q.nlocvars M.sizeupvalues=M.nups assert(Q.bl==nil)h.fs=Q.prev if Q then o:anchor_token(h)end end

function luaY:close_func(ls)
  local L = ls.L
  local fs = ls.fs
  local f = fs.f
  self:removevars(ls, 0)
  luaK:ret(fs, 0, 0)  -- final return
  -- luaM_reallocvector deleted for f->code, f->lineinfo, f->k, f->p,
  -- f->locvars, f->upvalues; not required for Lua table arrays
  f.sizecode = fs.pc
  f.sizelineinfo = fs.pc
  f.sizek = fs.nk
  f.sizep = fs.np
  f.sizelocvars = fs.nlocvars
  f.sizeupvalues = f.nups
  --assert(luaG_checkcode(f))  -- currently not implemented
  assert(fs.bl == nil)
  ls.fs = fs.prev
  -- the following is not required for this implementation; kept here
  -- for completeness
  -- L->top -= 2;  /* remove table and prototype from the stack */
  -- last token read was anchored in defunct function; must reanchor it
  if fs then self:anchor_token(ls) end
end
