summaryrefslogtreecommitdiff
path: root/jsmn.h
diff options
context:
space:
mode:
authorSerge A. Zaitsev <zaitsev.serge@gmail.com>2015-10-17 15:06:39 +0200
committerSerge A. Zaitsev <zaitsev.serge@gmail.com>2015-10-17 15:06:39 +0200
commitd0664f9a2ee942e0edaa255309f67b3f77e04b50 (patch)
tree031066562beec8e6bd38b703ba2cf4be2bad72d7 /jsmn.h
parent5e37daeec3cb49dc34a9377d3d2230c0394d1f3c (diff)
changed jsmnerr_t type to int
Diffstat (limited to 'jsmn.h')
-rw-r--r--jsmn.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/jsmn.h b/jsmn.h
index 59cbaa2be..01ca99c8e 100644
--- a/jsmn.h
+++ b/jsmn.h
@@ -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