diff options
Diffstat (limited to 'src/jsmn.c')
-rw-r--r-- | src/jsmn.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -30,7 +30,7 @@ /** * Allocates a fresh unused token from the token pull. */ -static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, +static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, jsmntok_t *tokens, size_t num_tokens) { jsmntok_t *tok; if (parser->toknext >= num_tokens) { @@ -48,7 +48,7 @@ static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, /** * Fills token type and boundaries. */ -static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, +static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, int start, int end) { token->type = type; token->start = start; @@ -156,7 +156,7 @@ static jsmnerr_t jsmn_parse_string(jsmn_parser *parser, const char *js, /** * Parse JSON string and fill tokens. */ -jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens, +jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens, unsigned int num_tokens) { jsmnerr_t r; int i; @@ -232,7 +232,7 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens, if (parser->toksuper != -1) tokens[parser->toksuper].size++; break; - case '\t' : case '\r' : case '\n' : case ':' : case ',': case ' ': + case '\t' : case '\r' : case '\n' : case ':' : case ',': case ' ': break; #ifdef JSMN_STRICT /* In strict mode primitives are: numbers and booleans */ @@ -269,7 +269,7 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, jsmntok_t *tokens, } /** - * Creates a new parser based over a given buffer with an array of tokens + * Creates a new parser based over a given buffer with an array of tokens * available. */ void jsmn_init(jsmn_parser *parser) { |