/
githubmirror
/
libfastjson
Обзор
Документация
Войти
/
githubmirror
/
libfastjson
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tests/testReplaceExisting.expected
15 строк
464 B
Eric Haszlakiewicz
Make it safe to delete keys while iterating with the json_object_object_foreach macro.
21 окт 2012, 05:26
21 окт 2012, 05:26
f6b27cb
Код
Авторство
О чём код?
==== delete-in-loop test starting ==== Key at index 0 is [foo1] (kept) Key at index 1 is [foo2] (kept) Key at index 2 is [deleteme] (deleted) Key at index 3 is [foo3] (kept) ==== replace-value first loop starting ==== Key at index 0 is [foo1] Key at index 1 is [foo2] replacing value for key [foo2] Key at index 2 is [foo3] ==== second loop starting ==== Key at index 0 is [foo1] Key at index 1 is [foo2] pointer for key [foo2] does match Key at index 2 is [foo3]