[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Inserting data in the middle of luaL_Buffer
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 27 May 2008 18:49:16 -0300
> <some-prefix><size><data1><data2>...<dataN><suffix>
>
> The question is, is it possible, at least at "implementation-specific"
> level to insert the number of elements after I have added all the data
> to buffer?
Push the prefix and nil and then open a buffer for the data. At the end,
close the buffer, lua_replace the nil with the size and concat the 3 strings.