aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/env.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd/env.h')
-rw-r--r--include/serd/env.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/include/serd/env.h b/include/serd/env.h
index 404c96b6..bfbda520 100644
--- a/include/serd/env.h
+++ b/include/serd/env.h
@@ -9,6 +9,7 @@
#include "serd/sink.h"
#include "serd/status.h"
#include "serd/string_view.h"
+#include "zix/attributes.h"
#include <stdbool.h>
@@ -24,28 +25,28 @@ SERD_BEGIN_DECLS
typedef struct SerdEnvImpl SerdEnv;
/// Create a new environment
-SERD_API SerdEnv* SERD_ALLOCATED
+SERD_API SerdEnv* ZIX_ALLOCATED
serd_env_new(SerdStringView base_uri);
/// Copy an environment
-SERD_API SerdEnv* SERD_ALLOCATED
-serd_env_copy(const SerdEnv* SERD_NULLABLE env);
+SERD_API SerdEnv* ZIX_ALLOCATED
+serd_env_copy(const SerdEnv* ZIX_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);
+serd_env_equals(const SerdEnv* ZIX_NULLABLE a, const SerdEnv* ZIX_NULLABLE b);
/// Free `env`
SERD_API void
-serd_env_free(SerdEnv* SERD_NULLABLE env);
+serd_env_free(SerdEnv* ZIX_NULLABLE env);
/// Get the current base URI
-SERD_PURE_API const SerdNode* SERD_NULLABLE
-serd_env_base_uri(const SerdEnv* SERD_NULLABLE env);
+SERD_PURE_API const SerdNode* ZIX_NULLABLE
+serd_env_base_uri(const SerdEnv* ZIX_NULLABLE env);
/// Set the current base URI
SERD_API SerdStatus
-serd_env_set_base_uri(SerdEnv* SERD_NONNULL env, SerdStringView uri);
+serd_env_set_base_uri(SerdEnv* ZIX_NONNULL env, SerdStringView uri);
/**
Set a namespace prefix.
@@ -55,9 +56,9 @@ serd_env_set_base_uri(SerdEnv* SERD_NONNULL env, SerdStringView uri);
expand to "http://www.w3.org/2001/XMLSchema#decimal".
*/
SERD_API SerdStatus
-serd_env_set_prefix(SerdEnv* SERD_NONNULL env,
- SerdStringView name,
- SerdStringView uri);
+serd_env_set_prefix(SerdEnv* ZIX_NONNULL env,
+ SerdStringView name,
+ SerdStringView uri);
/**
Qualify `uri` into a CURIE if possible.
@@ -65,32 +66,32 @@ serd_env_set_prefix(SerdEnv* SERD_NONNULL env,
Returns null if `uri` can not be qualified (usually because no corresponding
prefix is defined).
*/
-SERD_API SerdNode* SERD_ALLOCATED
-serd_env_qualify(const SerdEnv* SERD_NULLABLE env,
- const SerdNode* SERD_NULLABLE uri);
+SERD_API SerdNode* ZIX_ALLOCATED
+serd_env_qualify(const SerdEnv* ZIX_NULLABLE env,
+ const SerdNode* ZIX_NULLABLE uri);
/**
Expand `node`, which must be a CURIE or URI, to a full URI.
Returns null if `node` can not be expanded.
*/
-SERD_API SerdNode* SERD_ALLOCATED
-serd_env_expand(const SerdEnv* SERD_NULLABLE env,
- const SerdNode* SERD_NULLABLE node);
+SERD_API SerdNode* ZIX_ALLOCATED
+serd_env_expand(const SerdEnv* ZIX_NULLABLE env,
+ const SerdNode* ZIX_NULLABLE node);
/**
Expand `node`, which must be a CURIE or URI, to a full URI.
Returns null if `node` can not be expanded.
*/
-SERD_API SerdNode* SERD_ALLOCATED
-serd_env_expand_node(const SerdEnv* SERD_NULLABLE env,
- const SerdNode* SERD_NONNULL node);
+SERD_API SerdNode* ZIX_ALLOCATED
+serd_env_expand_node(const SerdEnv* ZIX_NULLABLE env,
+ const SerdNode* ZIX_NONNULL node);
/// Write all prefixes in `env` to `sink`
SERD_API SerdStatus
-serd_env_write_prefixes(const SerdEnv* SERD_NONNULL env,
- const SerdSink* SERD_NONNULL sink);
+serd_env_write_prefixes(const SerdEnv* ZIX_NONNULL env,
+ const SerdSink* ZIX_NONNULL sink);
/**
@}