[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Using a luaL_Buffer while traversing a table
- From: Ignacio Burgueño <ignaciob@...>
- Date: Wed, 12 Aug 2009 17:11:22 -0300
Hi. Does anyone have some tips (or code, preferable :D) on how to
traverse a table using lua_next while adding stuff to a luaL_Buffer ?
The fact that the buffer operations may change my stack top is giving me
trouble. I thought of saving the positions of the key and value after
lua_next, adding stuff to the buffer and then lua_remove(L, value_pos)
and bringing the key to the top of the stack. I haven't tried this, but
I'm afraid that it might break the buffer operations.
Regards,
Ignacio Burgueño