aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/buffer.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-19 20:26:13 -0500
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commit3d79b6ee36b250644e6cf70eee8e3076d94cbb7f (patch)
tree0f734bfcfd278d6eef5ca0e82c008b7f2a6f7bba /include/serd/buffer.h
parent7fb4c5264b91d5a5ce9f13a9fb4308088b31fcd4 (diff)
downloadserd-3d79b6ee36b250644e6cf70eee8e3076d94cbb7f.tar.gz
serd-3d79b6ee36b250644e6cf70eee8e3076d94cbb7f.tar.bz2
serd-3d79b6ee36b250644e6cf70eee8e3076d94cbb7f.zip
Use Zix attributes directly
Diffstat (limited to 'include/serd/buffer.h')
-rw-r--r--include/serd/buffer.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/include/serd/buffer.h b/include/serd/buffer.h
index f1bfa897..cf2170c3 100644
--- a/include/serd/buffer.h
+++ b/include/serd/buffer.h
@@ -5,6 +5,8 @@
#define SERD_BUFFER_H
#include "serd/attributes.h"
+#include "zix/allocator.h"
+#include "zix/attributes.h"
#include <stddef.h>
@@ -21,8 +23,8 @@ SERD_BEGIN_DECLS
/// A mutable buffer in memory
typedef struct {
- void* SERD_NULLABLE buf; ///< Buffer
- size_t len; ///< Size of buffer in bytes
+ void* ZIX_NULLABLE buf; ///< Buffer
+ size_t len; ///< Size of buffer in bytes
} SerdBuffer;
/**
@@ -34,10 +36,10 @@ typedef struct {
retrieved with serd_buffer_sink_finish().
*/
SERD_API size_t
-serd_buffer_sink(const void* SERD_NONNULL buf,
- size_t size,
- size_t nmemb,
- void* SERD_NONNULL stream);
+serd_buffer_sink(const void* ZIX_NONNULL buf,
+ size_t size,
+ size_t nmemb,
+ void* ZIX_NONNULL stream);
/**
Finish writing to a buffer with serd_buffer_sink().
@@ -45,8 +47,8 @@ serd_buffer_sink(const void* SERD_NONNULL buf,
The returned string is the result of the serialisation, which is null
terminated (by this function) and owned by the caller.
*/
-SERD_API char* SERD_NONNULL
-serd_buffer_sink_finish(SerdBuffer* SERD_NONNULL stream);
+SERD_API char* ZIX_NONNULL
+serd_buffer_sink_finish(SerdBuffer* ZIX_NONNULL stream);
/**
@}