diff options
author | Lloyd Hilaiel <lloyd@hilaiel.com> | 2011-04-28 11:04:26 -0600 |
---|---|---|
committer | Lloyd Hilaiel <lloyd@hilaiel.com> | 2011-04-28 11:04:26 -0600 |
commit | 5b0e7df9f60820dbd9d3faf8bae620f87cbb37bd (patch) | |
tree | a906037a76812a34204768ece0d436a5f089aa93 | |
parent | c7e221808b2a8d882d18592339cc0b1afddbf7c1 (diff) | |
download | yajl-5b0e7df9f60820dbd9d3faf8bae620f87cbb37bd.tar.gz |
fix typos in YAJL_IS_INTEGER and YAJL_IS_NUMBER. closes #302.0.2
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/api/yajl_tree.h | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,6 @@ 2.0.2 + * lth fix typos in yajl_tree.h macros YAJL_IS_INTEGER and YAJL_IS_DOUBLE, + contributed by Artem S Vybornov. * lth add #ifdef __cplusplus wrappers to yajl_tree to allow proper usage from many populer C++ compilers. diff --git a/src/api/yajl_tree.h b/src/api/yajl_tree.h index de36272..729c579 100644 --- a/src/api/yajl_tree.h +++ b/src/api/yajl_tree.h @@ -148,8 +148,8 @@ YAJL_API yajl_val yajl_tree_get(yajl_val parent, const char ** path, yajl_type t /* Various convenience macros to check the type of a `yajl_val` */ #define YAJL_IS_STRING(v) (((v) != NULL) && ((v)->type == yajl_t_string)) #define YAJL_IS_NUMBER(v) (((v) != NULL) && ((v)->type == yajl_t_number)) -#define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.flags & YAJL_NUMBER_INT_VALID)) -#define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.flags & YAJL_NUMBER_DOUBLE_VALID)) +#define YAJL_IS_INTEGER(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_INT_VALID)) +#define YAJL_IS_DOUBLE(v) (YAJL_IS_NUMBER(v) && ((v)->u.number.flags & YAJL_NUMBER_DOUBLE_VALID)) #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object)) #define YAJL_IS_ARRAY(v) (((v) != NULL) && ((v)->type == yajl_t_array )) #define YAJL_IS_TRUE(v) (((v) != NULL) && ((v)->type == yajl_t_true )) |