lua-users home
lua-l archive

Re: Userdata with no environment table by default

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


I just use the lua registry as my "no environment" value. since It's
already "on the stack", you can compare it right away.
On Fri, Feb 15, 2008 at 12:32 AM, Chris <coderight@gmail.com> wrote:
> On Thu, Feb 14, 2008 at 8:47 PM, Daniel Stephens
> <daniel@danielstephens.com> wrote:
> > Can you not create a single 'virgin environment' for those which haven't
> > been re-assigned and detect them that way?
> >
> >
>
> Thanks, yes that is something I thought of after I posted this and it
> might work. This is being used in performance critical code so I have
> been tweaking everything for that. I'm not sure if it will be an
> unacceptable performance hit or not compared to just testing for an
> empty environment (which is most of the objects; there are tens of
> millions of them).
>
> CR
>

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