[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: sharing strings between lua and C
- From: "jimmyp_gr <jimmyp@...>" <jimmyp@...>
- Date: Sun, 19 Jan 2003 19:35:38 -0000
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