json: Backport JSON_NODE_HOLDS macros

Unbreak the compilation with the internal copy of json-glib.
This commit is contained in:
Emmanuele Bassi 2010-06-22 07:58:49 +01:00
parent 1eb7f57582
commit 8a9890e138

View File

@ -44,6 +44,12 @@ G_BEGIN_DECLS
#define JSON_TYPE_OBJECT (json_object_get_type ())
#define JSON_TYPE_ARRAY (json_array_get_type ())
#define JSON_NODE_HOLDS(node,type) (JSON_NODE_TYPE (node) == (type))
#define JSON_NODE_HOLDS_VALUE(node) (JSON_NODE_HOLDS (node, JSON_NODE_VALUE))
#define JSON_NODE_HOLDS_ARRAY(node) (JSON_NODE_HOLDS (node, JSON_NODE_ARRAY))
#define JSON_NODE_HOLDS_OBJECT(node) (JSON_NODE_HOLDS (node, JSON_NODE_OBJECT))
#define JSON_NODE_HOLDS_NULL(node) (JSON_NODE_HOLDS (node, JSON_NODE_NULL))
/**
* JsonNode:
* @type: the type of node