lua-users home
lua-l archive

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


Is there any way to get a state-wide unique reference to any
particular object in the state?

I know there is the luaL_ref stuff but that's only unique to a
specific table.  I'm looking for something that can return a unique
reference (eg. memory pointer or something) to any object in the
entire state.  Something that doesn't change and always refers to the
same object.

I don't necessarily need to get a unique reference for basic types but
I would like to get them for functions and tables.  rawequal must be
using something similar to what I am talking about.  I see it is using
some garbage collector pointer or something like that.   Is there
currently a way to pull that out as a lightuserdata or some other way
to get that unique reference?

Thanks,
CR