[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How is string passed from Lua to C
- From: Rebel Neurofog <rebelneurofog@...>
- Date: Wed, 7 Dec 2011 18:57:05 +0300
On Wed, Dec 7, 2011 at 7:35 PM, Mark Hamburg <email@example.com> wrote:
> On Dec 7, 2011, at 3:09 AM, Rebel Neurofog wrote:
>> 1. Putting string into registry will guarantee it's validness during
>> lua_State lifetime.
> This is true of current implementations of Lua but is not guaranteed by the API. It could break, for example, if Lua shifted to a moving collector.
What do you mean?
String value will be lost? But then what will I get by accessing registry?
String value will change? But that's not about collector but string
hashing. So when should it happen not to ruin C code?
Please explain it in details. Until now I thought I have clear vision