| 242 | lua_gettop(L) + (i) + 1) |
| 243 | |
| 244 | static int PCallCheckTable(lua_State* L, char* buffer, uint32_t buffer_size, int index, bool do_log) |
| 245 | { |
| 246 | index = abs_index(L, index); |
| 247 | |
| 248 | int oldtop = lua_gettop(L); |
| 249 | lua_pushcfunction(L, LuaCheckTable); |
| 250 | lua_pushvalue(L, index); // add table again... |
| 251 | lua_pushlightuserdata(L, buffer); |
| 252 | lua_pushnumber(L, buffer_size); |
| 253 | int result = lua_pcall(L, 3, 0, 0); |
| 254 | if (result != 0) { |
| 255 | if (do_log) |
| 256 | printf("error %s\n", lua_tostring(L, oldtop + 1)); |
| 257 | lua_pop(L, 1); |
| 258 | } |
| 259 | assert(lua_gettop(L) == oldtop); |
| 260 | return result; |
| 261 | } |
| 262 | |
| 263 | TEST_F(LuaTableTest, Table01) |
| 264 | { |
no test coverage detected