src/c/json.c
static iot_json_tok_t * iot_json_alloc_token (iot_json_parser *parser, iot_json_tok_t *tokens, uint32_t num_tokens)
{
  iot_json_tok_t * tok = NULL;
  if (parser->toknext < num_tokens)
  {
    tok = &tokens[parser->toknext++];
    tok->start = tok->end = -1;
    tok->size = 0;
    tok->parent = -1;
  }
  return tok;
}
/**
 * Allocates a fresh unused token from the token pool.
 */
Allocates a fresh unused token from the token pool.
Allocates a fresh unused token from the token pool .
static iot_json_tok_t * iot_json_alloc_token (iot_json_parser *parser, iot_json_tok_t *tokens, uint32_t num_tokens)
{
  iot_json_tok_t * tok = NULL;
  if (parser->toknext < num_tokens)
  {
    tok = &tokens[parser->toknext++];
    tok->start = tok->end = -1;
    tok->size = 0;
    tok->parent = -1;
  }
  return tok;
}
static iot_json_tok_t * iot_json_alloc_token ( iot_json_parser * parser , iot_json_tok_t * tokens , uint32_t num_tokens ) { iot_json_tok_t * tok = NULL ; if ( parser -> toknext < num_tokens ) { tok = & tokens [ parser -> toknext ++ ] ; tok -> start = tok -> end = -1 ; tok -> size = 0 ; tok -> parent = -1 ; } return tok ; }
Allocates a fresh unused token from the token pool.
Allocates a fresh unused token from the token pool .