[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How can I push a table to lua in c++,Is there a more powerful API than lua_rawseti ?
- From: 唐兆宁 <yuxiaichou@...>
- Date: Tue, 3 Dec 2013 10:45:30 +0800
My problem is: I want to push a table to lua stack,not by the index,but the key value,which means I want to push a C++ map to lua table.For example,if I have a map "a" -> 1, "b" -> 2, can I get a lua table {a=1, b=2}? I find the lua_newtable and lua_rawseti could not work in my situation,Is there a solution? BTW, I use lua4.0.