diff options
author | David Robillard <d@drobilla.net> | 2022-12-19 20:26:13 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 3d79b6ee36b250644e6cf70eee8e3076d94cbb7f (patch) | |
tree | 0f734bfcfd278d6eef5ca0e82c008b7f2a6f7bba /include/serd/caret.h | |
parent | 7fb4c5264b91d5a5ce9f13a9fb4308088b31fcd4 (diff) | |
download | serd-3d79b6ee36b250644e6cf70eee8e3076d94cbb7f.tar.gz serd-3d79b6ee36b250644e6cf70eee8e3076d94cbb7f.tar.bz2 serd-3d79b6ee36b250644e6cf70eee8e3076d94cbb7f.zip |
Use Zix attributes directly
Diffstat (limited to 'include/serd/caret.h')
-rw-r--r-- | include/serd/caret.h | 28 |
1 files changed, 15 insertions, 13 deletions
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 <stdbool.h> @@ -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); /** @} |