Iterating through a Lua table from C++?

前端 未结 3 1267
忘掉有多难
忘掉有多难 2020-12-01 02:30

I\'m trying to load tables from Lua to C++ but I\'m having trouble getting it right. I\'m getting through the first iteration just fine but then at the second call to lua_ne

3条回答
  •  青春惊慌失措
    2020-12-01 02:58

    Why are you doing the extra lua_pop(L, 1) at the end of the version from the reference manual? I can see how that could be a problem, since you're popping beyond the stack depth.

提交回复
热议问题