Skip to content

Commit

Permalink
#ifdef __cpluplus wrappers for yajl_tree, closes lloyd#29
Browse files Browse the repository at this point in the history
  • Loading branch information
lloyd committed Apr 28, 2011
1 parent 7d34a7d commit c7e2218
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 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
Expand Down
8 changes: 8 additions & 0 deletions src/api/yajl_tree.h
Expand Up @@ -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,
Expand Down Expand Up @@ -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 */

0 comments on commit c7e2218

Please sign in to comment.