From b41264d1647da7a7479c858c975b6d1f2e035856 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Thu, 16 Feb 2017 21:22:43 +0100 Subject: [PATCH] Remove uint8_t because it's not part of C89 --- cJSON.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cJSON.c b/cJSON.c index aef9824..9bc94ba 100644 --- a/cJSON.c +++ b/cJSON.c @@ -30,7 +30,6 @@ #include #include #include -#include #include "cJSON.h" /* define our own boolean type */ @@ -405,7 +404,7 @@ static unsigned parse_hex4(const unsigned char * const input) /* converts a UTF-16 literal to UTF-8 * A literal can be one or two sequences of the form \uXXXX */ -static uint8_t utf16_literal_to_utf8(const unsigned char * const input_pointer, const unsigned char * const input_end, unsigned char **output_pointer, const unsigned char **error_pointer) +static unsigned char utf16_literal_to_utf8(const unsigned char * const input_pointer, const unsigned char * const input_end, unsigned char **output_pointer, const unsigned char **error_pointer) { /* first bytes of UTF8 encoding for a given length in bytes */ static const unsigned char firstByteMark[5] = @@ -420,8 +419,8 @@ static uint8_t utf16_literal_to_utf8(const unsigned char * const input_pointer, long unsigned int codepoint = 0; unsigned int first_code = 0; const unsigned char *first_sequence = input_pointer; - uint8_t utf8_length = 0; - uint8_t sequence_length = 0; + unsigned char utf8_length = 0; + unsigned char sequence_length = 0; /* get the first utf16 sequence */ first_code = parse_hex4(first_sequence + 2); @@ -600,7 +599,7 @@ static const unsigned char *parse_string(cJSON * const item, const unsigned char /* escape sequence */ else { - uint8_t sequence_length = 2; + unsigned char sequence_length = 2; switch (input_pointer[1]) { case 'b':