Re: lstring expansion from the c side
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: lstring expansion from the c side
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2000年5月31日 09:33:36 -0300 (EST)
>From lua-l@tecgraf.puc-rio.br Tue May 30 15:44:16 2000
>From: Jim Mathies <Jim@mathies.com>
>
>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.
--lhf