lua-users home
lua-l archive

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

>From  Tue May 30 15:44:16 2000
>From: Jim Mathies <>
>What is the simplest and fastest way to
>expand the size of the buffer used to
>store a lua lstring, from the c side?
>assuming I have the string object.

I'm sorry, I don't quite understand what you want to do.
There's no way to change individual bytes inside a Lua string -- you have to
create another string.
So, if you want to edit a string, just do it in C (say, by changing
individual bytes or by appending something to it), and then send this string
to Lua, using lua_pushlstring.
Perhaps I'm missing something.