lua-users home
lua-l archive

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


Since noone else answers to my question I will.I think(after a few
tests) that the answer to the first question is yes.That is I do get
the pointer to the actual string with lua_tostring.So the pointer I
assign to the C var in my metamethod should be valid after the
metamethod exits.
On the second question:I've noticed something about a reference
mechanism in the manual.I checked the lauxlib.c file but could not
find out much about it.My guess is that luaL_ref creates a reference
to some value and unref destroys it.Is that like putting that value in
the registry?That could be usefull...

Dimitris