lua-users home
lua-l archive

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


Title: RE: zero-copy readonly strings from C to Lua?

> I can understand that it would be hard to interact with GC and
> string consolidation and so forth, but I'd think if I made a
> guarantee to never again touch those bytes for the life of the given
> lua_State, Lua should be able to accept some memory from C without
> having to always and invariably copy it. No?

That would impair Lua's string comparison via pointer compares,
for one.

--
Vincent Penquerc'h