diff options
author | Daniel Mack <github@zonque.org> | 2015-11-02 10:57:38 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-11-02 10:57:38 +0100 |
commit | 86b4428a58739a3899f0d2cee5bf78ba861d16b7 (patch) | |
tree | 62b24c733d65866a8302114cc3440d4ee3ca2097 /src/basic/json.c | |
parent | 8fa7cf70764319982e6617413cd0e287f6e35447 (diff) | |
parent | 025b4c410577a10692c608e7dbad712655abb858 (diff) |
Merge pull request #1740 from shawnl/master
utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t
Diffstat (limited to 'src/basic/json.c')
-rw-r--r-- | src/basic/json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/json.c b/src/basic/json.c index 716705e5ff..a22bc865a7 100644 --- a/src/basic/json.c +++ b/src/basic/json.c @@ -319,7 +319,7 @@ static int json_parse_string(const char **p, char **ret) { else if (*c == 't') ch = '\t'; else if (*c == 'u') { - uint16_t x; + char16_t x; int r; r = unhex_ucs2(c + 1, &x); @@ -332,7 +332,7 @@ static int json_parse_string(const char **p, char **ret) { return -ENOMEM; if (!utf16_is_surrogate(x)) - n += utf8_encode_unichar(s + n, x); + n += utf8_encode_unichar(s + n, (char32_t) x); else if (utf16_is_trailing_surrogate(x)) return -EINVAL; else { |