json token type enum doesn't start with zero value anymore, fixes #24

master
Serge A. Zaitsev 9 years ago
parent d87c22d2cd
commit 226f318224

@ -15,10 +15,11 @@ extern "C" {
* o Other primitive: number, boolean (true/false) or null * o Other primitive: number, boolean (true/false) or null
*/ */
typedef enum { typedef enum {
JSMN_PRIMITIVE = 0, JSMN_UNDEFINED = 0,
JSMN_OBJECT = 1, JSMN_OBJECT = 1,
JSMN_ARRAY = 2, JSMN_ARRAY = 2,
JSMN_STRING = 3 JSMN_STRING = 3,
JSMN_PRIMITIVE = 4
} jsmntype_t; } jsmntype_t;
typedef enum { typedef enum {

@ -554,10 +554,11 @@ int test_keyvalue(void) {
#define jsmntype_t jsmntype_nonstrict_t #define jsmntype_t jsmntype_nonstrict_t
#define jsmnerr_t jsmnerr_nonstrict_t #define jsmnerr_t jsmnerr_nonstrict_t
#define jsmntok_t jsmntok_nonstrict_t #define jsmntok_t jsmntok_nonstrict_t
#define JSMN_PRIMITIVE JSMN_PRIMITIVE_NONSTRICT
#define JSMN_OBJECT JSMN_OBJECT_NONSTRICT #define JSMN_OBJECT JSMN_OBJECT_NONSTRICT
#define JSMN_ARRAY JSMN_ARRAY_NONSTRICT #define JSMN_ARRAY JSMN_ARRAY_NONSTRICT
#define JSMN_STRING JSMN_STRING_NONSTRICT #define JSMN_STRING JSMN_STRING_NONSTRICT
#define JSMN_PRIMITIVE JSMN_PRIMITIVE_NONSTRICT
#define JSMN_UNDEFINED JSMN_UNDEFINED_NONSTRICT
#define JSMN_ERROR_NOMEM JSMN_ERROR_NOMEM_NONSTRICT #define JSMN_ERROR_NOMEM JSMN_ERROR_NOMEM_NONSTRICT
#define JSMN_ERROR_INVAL JSMN_ERROR_INVAL_NONSTRICT #define JSMN_ERROR_INVAL JSMN_ERROR_INVAL_NONSTRICT
#define JSMN_ERROR_PART JSMN_ERROR_PART_NONSTRICT #define JSMN_ERROR_PART JSMN_ERROR_PART_NONSTRICT

Loading…
Cancel
Save