Revert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t"

This commit is contained in:
Lennart Poettering
2015-11-02 11:21:25 +01:00
parent 6b61ae72fa
commit dcd1262673
7 changed files with 36 additions and 37 deletions
+2 -2
View File
@@ -319,7 +319,7 @@ static int json_parse_string(const char **p, char **ret) {
else if (*c == 't')
ch = '\t';
else if (*c == 'u') {
char16_t x;
uint16_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, (char32_t) x);
n += utf8_encode_unichar(s + n, x);
else if (utf16_is_trailing_surrogate(x))
return -EINVAL;
else {