aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/statement.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd/statement.h')
-rw-r--r--include/serd/statement.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/serd/statement.h b/include/serd/statement.h
index a4109958..03d7ae6d 100644
--- a/include/serd/statement.h
+++ b/include/serd/statement.h
@@ -6,6 +6,7 @@
#include "serd/attributes.h"
#include "serd/caret.h"
+#include "serd/memory.h"
#include "serd/node.h"
#include "zix/attributes.h"
@@ -55,6 +56,7 @@ typedef struct SerdStatementImpl SerdStatement;
statements in models, this is the lifetime of the model. For user-created
statements, the simplest way to handle this is to use `SerdNodes`.
+ @param allocator Allocator for the returned statement.
@param s The subject
@param p The predicate ("key")
@param o The object ("value")
@@ -63,7 +65,8 @@ typedef struct SerdStatementImpl SerdStatement;
@return A new statement that must be freed with serd_statement_free()
*/
SERD_API SerdStatement* ZIX_ALLOCATED
-serd_statement_new(const SerdNode* ZIX_NONNULL s,
+serd_statement_new(SerdAllocator* ZIX_NULLABLE allocator,
+ const SerdNode* ZIX_NONNULL s,
const SerdNode* ZIX_NONNULL p,
const SerdNode* ZIX_NONNULL o,
const SerdNode* ZIX_NULLABLE g,
@@ -71,11 +74,13 @@ serd_statement_new(const SerdNode* ZIX_NONNULL s,
/// Return a copy of `statement`
SERD_API SerdStatement* ZIX_ALLOCATED
-serd_statement_copy(const SerdStatement* ZIX_NULLABLE statement);
+serd_statement_copy(SerdAllocator* ZIX_NULLABLE allocator,
+ const SerdStatement* ZIX_NULLABLE statement);
/// Free `statement`
SERD_API void
-serd_statement_free(SerdStatement* ZIX_NULLABLE statement);
+serd_statement_free(SerdAllocator* ZIX_NULLABLE allocator,
+ SerdStatement* ZIX_NULLABLE statement);
/// Return the given node of the statement
SERD_PURE_API const SerdNode* ZIX_NULLABLE