aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-26 11:54:21 -0500
committerDavid Robillard <d@drobilla.net>2019-01-05 17:12:38 +0100
commit31b57fdf337fc906151bb597a0e6ceede374620b (patch)
tree6b825b63f26a2fc1b203ce1663e156c0b67f9609 /src
parentd4e594b0825391db76d72fbf092451d86ebe66c2 (diff)
downloadserd-31b57fdf337fc906151bb597a0e6ceede374620b.tar.gz
serd-31b57fdf337fc906151bb597a0e6ceede374620b.tar.bz2
serd-31b57fdf337fc906151bb597a0e6ceede374620b.zip
Add serd_new_boolean()
Diffstat (limited to 'src')
-rw-r--r--src/node.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 48511ca4..38e5fc3e 100644
--- a/src/node.c
+++ b/src/node.c
@@ -51,6 +51,7 @@ typedef struct StaticNode {
DEFINE_XSD_NODE(decimal)
DEFINE_XSD_NODE(integer)
+DEFINE_XSD_NODE(boolean)
DEFINE_XSD_NODE(base64Binary)
static SerdNode*
@@ -623,6 +624,12 @@ serd_new_integer(int64_t i, const SerdNode* datatype)
}
SerdNode*
+serd_new_boolean(bool b)
+{
+ return serd_new_typed_literal(b ? "true" : "false", &serd_xsd_boolean.node);
+}
+
+SerdNode*
serd_new_blob(const void* buf,
size_t size,
bool wrap_lines,