lua-users home
lua-l archive

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


On 09.01.2011 23:49, Sam Roberts wrote:
On Fri, Jan 7, 2011 at 8:49 PM, GrayFace<sergroj@mail.ru>  wrote:
On 07.01.2011 21:36, Mark Hamburg wrote:
If your C code needs to reference a Lua value, I tend to recommend using
light userdata keys in the registry bearing in mind that this creates
anchors for the GC.

Where can I read more about these GC anchors?
http://www.lua.org/pil/17.html

I haven't found anything on the issue there.

I was wrong about light userdata. There already is such agreement: "Typically, you should use as key a string containing your library name or a light userdata with the address of a C object in your code." (c) manual.

--
Best regards,
Sergey Rozhenko                 mailto:sergroj@mail.ru