aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-30 17:31:10 +0200
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commit0efd9229584397140c85d323c1abfd649d0b662e (patch)
treec298600b44339659586060fbb2fd79af7ce4b64a /include
parentebc3356419f3fa6a535ba326b7492e44a532b035 (diff)
downloadserd-0efd9229584397140c85d323c1abfd649d0b662e.tar.gz
serd-0efd9229584397140c85d323c1abfd649d0b662e.tar.bz2
serd-0efd9229584397140c85d323c1abfd649d0b662e.zip
Add serd_env_copy() and serd_env_equals()
Diffstat (limited to 'include')
-rw-r--r--include/serd/env.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/serd/env.h b/include/serd/env.h
index 2b2982f3..404c96b6 100644
--- a/include/serd/env.h
+++ b/include/serd/env.h
@@ -10,6 +10,8 @@
#include "serd/status.h"
#include "serd/string_view.h"
+#include <stdbool.h>
+
SERD_BEGIN_DECLS
/**
@@ -25,6 +27,14 @@ typedef struct SerdEnvImpl SerdEnv;
SERD_API SerdEnv* SERD_ALLOCATED
serd_env_new(SerdStringView base_uri);
+/// Copy an environment
+SERD_API SerdEnv* SERD_ALLOCATED
+serd_env_copy(const SerdEnv* SERD_NULLABLE env);
+
+/// Return true iff `a` is equal to `b`
+SERD_PURE_API bool
+serd_env_equals(const SerdEnv* SERD_NULLABLE a, const SerdEnv* SERD_NULLABLE b);
+
/// Free `env`
SERD_API void
serd_env_free(SerdEnv* SERD_NULLABLE env);