static void wb_table(lua_State *L, struct write_block *wb, int index, int depth) { luaL_checkstack(L, LUA_MINSTACK, NULL); if (index < 0) { index = lua_gettop(L) + index + 1; } int array_size = wb_table_array(L, wb, index, depth); wb_table_hash(L, wb, index, depth, array_size); }
static void wb_table(lua_State *L, struct write_block *wb, int index, int depth) { luaL_checkstack(L, LUA_MINSTACK, NULL); if (index < 0) { index = lua_gettop(L) + index + 1; } if (luaL_getmetafield(L, index, "__pairs") != LUA_TNIL) { wb_table_metapairs(L, wb, index, depth); } else { int array_size = wb_table_array(L, wb, index, depth); wb_table_hash(L, wb, index, depth, array_size); } }