lua-users home
lua-l archive

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

> 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