summaryrefslogtreecommitdiff
path: root/xs_json.h
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-09 08:32:20 +0100
committerdefault <nobody@localhost>2024-03-09 08:32:20 +0100
commit00b019b8902e9d319d855b9156f97f931923331c (patch)
tree3d17736c3884f119b3e223947bea31b6f5953ce1 /xs_json.h
parente12af777993ca655f285e852ad0dbee6bdca014f (diff)
Backport from xs.
Diffstat (limited to 'xs_json.h')
-rw-r--r--xs_json.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/xs_json.h b/xs_json.h
index e7f275d..d656b15 100644
--- a/xs_json.h
+++ b/xs_json.h
@@ -115,7 +115,9 @@ static void _xs_json_dump(const xs_val *s_data, int level, int indent, FILE *f)
fputc('{', f);
xs_str *k;
- while (xs_dict_iter(&data, &k, &v)) {
+ int ct = 0;
+
+ while (xs_dict_next(s_data, &k, &v, &ct)) {
if (c != 0)
fputc(',', f);