From 0efd9229584397140c85d323c1abfd649d0b662e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Sep 2018 17:31:10 +0200 Subject: Add serd_env_copy() and serd_env_equals() --- include/serd/env.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') 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 + 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); -- cgit v1.2.1