aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/json/json_rewrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/json/json_rewrite.c')
-rw-r--r--test/core/json/json_rewrite.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/core/json/json_rewrite.c b/test/core/json/json_rewrite.c
index 42fdbd6d54..0c615a9975 100644
--- a/test/core/json/json_rewrite.c
+++ b/test/core/json/json_rewrite.c
@@ -94,33 +94,33 @@ static void json_reader_string_clear(void *userdata) {
state->string_len = 0;
}
-static void json_reader_string_add_char(void *userdata, gpr_uint32 c) {
+static void json_reader_string_add_char(void *userdata, uint32_t c) {
json_reader_userdata *state = userdata;
check_string(state, 1);
GPR_ASSERT(c < 256);
state->scratchpad[state->string_len++] = (char)c;
}
-static void json_reader_string_add_utf32(void *userdata, gpr_uint32 c) {
+static void json_reader_string_add_utf32(void *userdata, uint32_t c) {
if (c <= 0x7f) {
json_reader_string_add_char(userdata, c);
} else if (c <= 0x7ff) {
- gpr_uint32 b1 = 0xc0u | ((c >> 6u) & 0x1fu);
- gpr_uint32 b2 = 0x80u | (c & 0x3fu);
+ uint32_t b1 = 0xc0u | ((c >> 6u) & 0x1fu);
+ uint32_t b2 = 0x80u | (c & 0x3fu);
json_reader_string_add_char(userdata, b1);
json_reader_string_add_char(userdata, b2);
} else if (c <= 0xffffu) {
- gpr_uint32 b1 = 0xe0u | ((c >> 12u) & 0x0fu);
- gpr_uint32 b2 = 0x80u | ((c >> 6u) & 0x3fu);
- gpr_uint32 b3 = 0x80u | (c & 0x3fu);
+ uint32_t b1 = 0xe0u | ((c >> 12u) & 0x0fu);
+ uint32_t b2 = 0x80u | ((c >> 6u) & 0x3fu);
+ uint32_t b3 = 0x80u | (c & 0x3fu);
json_reader_string_add_char(userdata, b1);
json_reader_string_add_char(userdata, b2);
json_reader_string_add_char(userdata, b3);
} else if (c <= 0x1fffffu) {
- gpr_uint32 b1 = 0xf0u | ((c >> 18u) & 0x07u);
- gpr_uint32 b2 = 0x80u | ((c >> 12u) & 0x3fu);
- gpr_uint32 b3 = 0x80u | ((c >> 6u) & 0x3fu);
- gpr_uint32 b4 = 0x80u | (c & 0x3fu);
+ uint32_t b1 = 0xf0u | ((c >> 18u) & 0x07u);
+ uint32_t b2 = 0x80u | ((c >> 12u) & 0x3fu);
+ uint32_t b3 = 0x80u | ((c >> 6u) & 0x3fu);
+ uint32_t b4 = 0x80u | (c & 0x3fu);
json_reader_string_add_char(userdata, b1);
json_reader_string_add_char(userdata, b2);
json_reader_string_add_char(userdata, b3);
@@ -128,13 +128,13 @@ static void json_reader_string_add_utf32(void *userdata, gpr_uint32 c) {
}
}
-static gpr_uint32 json_reader_read_char(void *userdata) {
+static uint32_t json_reader_read_char(void *userdata) {
int r;
json_reader_userdata *state = userdata;
r = fgetc(state->in);
if (r == EOF) r = GRPC_JSON_READ_CHAR_EOF;
- return (gpr_uint32)r;
+ return (uint32_t)r;
}
static void json_reader_container_begins(void *userdata, grpc_json_type type) {