From 3d79b6ee36b250644e6cf70eee8e3076d94cbb7f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 19 Dec 2022 20:26:13 -0500 Subject: Use Zix attributes directly --- include/serd/caret.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'include/serd/caret.h') diff --git a/include/serd/caret.h b/include/serd/caret.h index 2ed77412..f8983899 100644 --- a/include/serd/caret.h +++ b/include/serd/caret.h @@ -6,6 +6,8 @@ #include "serd/attributes.h" #include "serd/node.h" +#include "zix/allocator.h" +#include "zix/attributes.h" #include @@ -33,23 +35,23 @@ typedef struct SerdCaretImpl SerdCaret; @param column The column number in the document (1-based) @return A new caret that must be freed with serd_caret_free() */ -SERD_API SerdCaret* SERD_ALLOCATED -serd_caret_new(const SerdNode* SERD_NONNULL document, - unsigned line, - unsigned column); +SERD_API SerdCaret* ZIX_ALLOCATED +serd_caret_new(const SerdNode* ZIX_NONNULL document, + unsigned line, + unsigned column); /// Return a copy of `caret` -SERD_API SerdCaret* SERD_ALLOCATED -serd_caret_copy(const SerdCaret* SERD_NULLABLE caret); +SERD_API SerdCaret* ZIX_ALLOCATED +serd_caret_copy(const SerdCaret* ZIX_NULLABLE caret); /// Free `caret` SERD_API void -serd_caret_free(SerdCaret* SERD_NULLABLE caret); +serd_caret_free(SerdCaret* ZIX_NULLABLE caret); /// Return true iff `lhs` is equal to `rhs` SERD_PURE_API bool -serd_caret_equals(const SerdCaret* SERD_NULLABLE lhs, - const SerdCaret* SERD_NULLABLE rhs); +serd_caret_equals(const SerdCaret* ZIX_NULLABLE lhs, + const SerdCaret* ZIX_NULLABLE rhs); /** Return the document URI or name. @@ -57,16 +59,16 @@ serd_caret_equals(const SerdCaret* SERD_NULLABLE lhs, This is typically a file URI, but may be a descriptive string node for statements that originate from streams. */ -SERD_PURE_API const SerdNode* SERD_NONNULL -serd_caret_document(const SerdCaret* SERD_NONNULL caret); +SERD_PURE_API const SerdNode* ZIX_NONNULL +serd_caret_document(const SerdCaret* ZIX_NONNULL caret); /// Return the one-relative line number in the document SERD_PURE_API unsigned -serd_caret_line(const SerdCaret* SERD_NONNULL caret); +serd_caret_line(const SerdCaret* ZIX_NONNULL caret); /// Return the zero-relative column number in the line SERD_PURE_API unsigned -serd_caret_column(const SerdCaret* SERD_NONNULL caret); +serd_caret_column(const SerdCaret* ZIX_NONNULL caret); /** @} -- cgit v1.2.1