summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLloyd Hilaiel <lloyd@hilaiel.com>2011-04-28 09:51:49 -0600
committerLloyd Hilaiel <lloyd@hilaiel.com>2011-04-28 09:51:49 -0600
commitc7e221808b2a8d882d18592339cc0b1afddbf7c1 (patch)
tree3e260671be2af40baf22d7a3ffe937fd98c13fe3
parent7d34a7d572d0b261c2c819c7961e9263922e81c5 (diff)
downloadyajl-c7e221808b2a8d882d18592339cc0b1afddbf7c1.tar.gz
#ifdef __cpluplus wrappers for yajl_tree, closes #29
-rw-r--r--ChangeLog4
-rw-r--r--src/api/yajl_tree.h8
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e228e5..bae37cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2.0.2
+ * lth add #ifdef __cplusplus wrappers to yajl_tree to allow proper
+ usage from many populer C++ compilers.
+
2.0.1
* lth generator flag to allow client to specify they want
escaped solidi '/'. issue #28
diff --git a/src/api/yajl_tree.h b/src/api/yajl_tree.h
index 8b377f6..de36272 100644
--- a/src/api/yajl_tree.h
+++ b/src/api/yajl_tree.h
@@ -33,6 +33,10 @@
#include <yajl/yajl_common.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** possible data types that a yajl_val_s can hold */
typedef enum {
yajl_t_string = 1,
@@ -174,4 +178,8 @@ YAJL_API yajl_val yajl_tree_get(yajl_val parent, const char ** path, yajl_type t
/** Get a pointer to a yajl_val_array or NULL if the value is not an object. */
#define YAJL_GET_ARRAY(v) (YAJL_IS_ARRAY(v) ? &(v)->u.array : NULL)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* YAJL_TREE_H */