From a89501b2fbc4fa30b0653328931cf7d9162851e6 Mon Sep 17 00:00:00 2001 From: Gabriel Gritsch Date: Fri, 21 Feb 2014 09:52:23 +0100 Subject: Integrate changes made by Serge Zaitsev. --- jsmn.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'jsmn.h') diff --git a/jsmn.h b/jsmn.h index 8f10cf9df..54930ad55 100644 --- a/jsmn.h +++ b/jsmn.h @@ -1,10 +1,6 @@ #ifndef __JSMN_H_ #define __JSMN_H_ -#ifdef __cplusplus -extern "C" { -#endif - /** * JSON type identifier. Basic types are: * o Object @@ -26,8 +22,6 @@ typedef enum { JSMN_ERROR_INVAL = -2, /* The string is not a full JSON packet, more bytes expected */ JSMN_ERROR_PART = -3, - /* Everything was fine */ - JSMN_SUCCESS = 0 } jsmnerr_t; /** @@ -62,21 +56,10 @@ typedef struct { void jsmn_init(jsmn_parser *parser); /** - * Run JSON parser. It parses a JSON data null-terminated-string into and array of tokens, each describing + * Run JSON parser. It parses a JSON data string into and array of tokens, each describing * a single JSON object. */ -static inline jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, +jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmntok_t *tokens, unsigned int num_tokens); -/** - * Run JSON parser. It parses a JSON data buffer with specified length into and array of tokens, each describing - * a single JSON object. - */ -jsmnerr_t jsmn_parseV2(jsmn_parser *parser, const char *js, size_t js_length, - jsmntok_t *tokens, unsigned int num_tokens); - -#ifdef __cplusplus -} -#endif - #endif /* __JSMN_H_ */ -- cgit v1.2.3