aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-20 13:02:24 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:06 -0500
commit229443778ffc6b26a13322983b81f4f1912427af (patch)
tree028e9c7cdf7ca9b994603986c979fba183078345 /include/serd/serd.h
parentc7a5af0235706bc0624a236fae03fc728144234f (diff)
downloadserd-229443778ffc6b26a13322983b81f4f1912427af.tar.gz
serd-229443778ffc6b26a13322983b81f4f1912427af.tar.bz2
serd-229443778ffc6b26a13322983b81f4f1912427af.zip
Add serd_node_compare()
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r--include/serd/serd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 6aeb9138..4cf00f02 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1033,6 +1033,18 @@ serd_node_equals(const SerdNode* SERD_NULLABLE a,
const SerdNode* SERD_NULLABLE b);
/**
+ Compare two nodes.
+
+ Returns less than, equal to, or greater than zero if `a` is less than, equal
+ to, or greater than `b`, respectively. NULL is treated as less than any
+ other node.
+*/
+SERD_PURE_API
+int
+serd_node_compare(const SerdNode* SERD_NULLABLE a,
+ const SerdNode* SERD_NULLABLE b);
+
+/**
@}
@defgroup serd_event Event Handlers
@{