lua-users home
lua-l archive

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


Hi, list!

In my C function I'm building with luaL_Buffer a string with some
data. String is built like this:

  <some-prefix><size><data1><data2>...<dataN><suffix>

That is, it have size before all elements are listed. I do not know
the size before I've written all the elements. Any of data elements
may be built of more data elements.

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? I'd like to avoid creating nested buffers for each layer of
data.

Thanks in advance,
Alexander.