[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: String parameters when calling C from Lua
- From: "Daniel Collins" <daniel.collins@...>
- Date: Fri, 19 May 2006 21:21:21 +0930
> But the current GC algorithm (as of Lua 5.0/5.1) does not
> move objects. So right now you can also rely on the fact that
> the string pointer is valid as long as there is _any_
> reference to it (i.e. from the table you use to store them).
>
> Yes, the latter means relying on implementation internals.
> But nobody forces you to upgrade to a newer Lua version. The
> C API usually changes over major versions, anyway.
Interesting. This project will be lua5.1 for life, but relying on an
implementation detail like this just seems naughty to me.
- DC