projects
/
jansson.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f4d6f8
)
Add macro json_is_boolean
author
Petri Lehtinen
<petri@digip.org>
Tue, 28 Jul 2009 08:36:53 +0000
(11:36 +0300)
committer
Petri Lehtinen
<petri@digip.org>
Thu, 30 Jul 2009 08:32:27 +0000
(11:32 +0300)
src/jansson.h
patch
|
blob
|
history
diff --git
a/src/jansson.h
b/src/jansson.h
index
91bf553
..
e7bd238
100644
(file)
--- a/
src/jansson.h
+++ b/
src/jansson.h
@@
-38,6
+38,7
@@
typedef struct {
#define json_is_number(json) (json_is_integer(json) || json_is_real(json))
#define json_is_true(json) (json && json_typeof(json) == JSON_TRUE)
#define json_is_false(json) (json && json_typeof(json) == JSON_FALSE)
+#define json_is_boolean(json) (jsin_is_true(json) || json_is_false(json))
#define json_is_null(json) (json && json_typeof(json) == JSON_NULL)
/* construction, destruction, reference counting */