lua-users home
lua-l archive

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


All Lua strings are created using newlstr(), which always adds '\0' at the end of allocated string.
Would Lua work without this terminating null?
How much change is needed to make it work?

Why:
I have modified Lua to keep data separately from the TString header, so that it can reside in memory that is not managed by Lua. However, there might be some cases when target data may have no terminating null. I want to know if Lua can operate correctly with string data even if no terminating null is present, or does such data always require copying.
--j<