diff options
author | Serge A. Zaitsev <zaitsev.serge@gmail.com> | 2015-10-17 15:06:39 +0200 |
---|---|---|
committer | Serge A. Zaitsev <zaitsev.serge@gmail.com> | 2015-10-17 15:06:39 +0200 |
commit | d0664f9a2ee942e0edaa255309f67b3f77e04b50 (patch) | |
tree | 031066562beec8e6bd38b703ba2cf4be2bad72d7 /jsmn.h | |
parent | 5e37daeec3cb49dc34a9377d3d2230c0394d1f3c (diff) |
changed jsmnerr_t type to int
Diffstat (limited to 'jsmn.h')
-rw-r--r-- | jsmn.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -22,14 +22,14 @@ typedef enum { JSMN_PRIMITIVE = 4 } jsmntype_t; -typedef enum { +enum jsmnerr { /* Not enough tokens were provided */ JSMN_ERROR_NOMEM = -1, /* Invalid character inside JSON string */ JSMN_ERROR_INVAL = -2, /* The string is not a full JSON packet, more bytes expected */ JSMN_ERROR_PART = -3 -} jsmnerr_t; +}; /** * JSON token description. @@ -66,7 +66,7 @@ void jsmn_init(jsmn_parser *parser); * Run JSON parser. It parses a JSON data string into and array of tokens, each describing * a single JSON object. */ -jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, +int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens); #ifdef __cplusplus |