aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-26 01:08:50 +0000
committerDavid Robillard <d@drobilla.net>2011-01-26 01:08:50 +0000
commitb0d5a7b4a2c8fae72af553804a33bf11471c458a (patch)
tree66360b08861b530059e7a172334e870ff6a64479 /serd
parent36a5b19d492827eed3daa7ff7517580c83e3e9ff (diff)
downloadserd-b0d5a7b4a2c8fae72af553804a33bf11471c458a.tar.gz
serd-b0d5a7b4a2c8fae72af553804a33bf11471c458a.tar.bz2
serd-b0d5a7b4a2c8fae72af553804a33bf11471c458a.zip
Fix compilation in C++ (which won't implicitly cast 0 to an enum).
git-svn-id: http://svn.drobilla.net/serd/trunk@82 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/serd/serd.h b/serd/serd.h
index de2be28d..91dd7076 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -74,6 +74,9 @@ typedef enum {
* @ref SERD_ANON equivalent to SERD_BLANK_ID.
*/
typedef enum {
+ /** The type of a NULL node. */
+ SERD_NOTHING = 0,
+
/** Literal value. A literal optionally has either an associated language,
* or an associated datatype (not both).
*/
@@ -171,7 +174,7 @@ typedef struct {
const uint8_t* buf; ///< Buffer
} SerdNode;
-static const SerdNode SERD_NODE_NULL = { 0, 0, 0, 0 };
+static const SerdNode SERD_NODE_NULL = { SERD_NOTHING, 0, 0, 0 };
/** Make a deep copy of @a node.
* @return a node that the caller must free with @ref serd_node_free.