lua-users home
lua-l archive

Re: Recipe: setfenv with Lua 5.2.0 work3

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > I thought upvaluejoin can only join upvalues. How can it be used to
> > break the link?
> 
> function breaklink (f, upidx)
> local a
> local function dummy () return a end
> debug.upvaluejoin(f, upidx, dummy, 1)
> end
In words: to create a new link you must break the old one.
-- Roberto

AltStyle によって変換されたページ (->オリジナル) /