From 5b0e7df9f60820dbd9d3faf8bae620f87cbb37bd Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel Date: Thu, 28 Apr 2011 11:04:26 -0600 Subject: fix typos in YAJL_IS_INTEGER and YAJL_IS_NUMBER. closes #30 --- ChangeLog | 2 ++ src/api/yajl_tree.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bae37cd..666fade 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 )) -- cgit v1.2.1