lua-users home
lua-l archive

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


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