aboutsummaryrefslogtreecommitdiffstats
path: root/src/byte_source.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/byte_source.c')
-rw-r--r--src/byte_source.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/byte_source.c b/src/byte_source.c
index 249c0dde..6ec2084a 100644
--- a/src/byte_source.c
+++ b/src/byte_source.c
@@ -3,10 +3,10 @@
#include "byte_source.h"
-#include "memory.h"
#include "system.h"
#include "serd/node.h"
+#include "zix/allocator.h"
#include <assert.h>
#include <stdbool.h>
@@ -39,11 +39,11 @@ serd_byte_source_page(SerdByteSource* const source)
}
static void
-serd_byte_source_init_buffer(SerdAllocator* const allocator,
+serd_byte_source_init_buffer(ZixAllocator* const allocator,
SerdByteSource* const source)
{
if (source->block_size > 1) {
- source->block = (uint8_t*)serd_aaligned_alloc(
+ source->block = (uint8_t*)zix_aligned_alloc(
allocator, SERD_PAGE_SIZE, source->block_size);
if ((source->read_buf = source->block)) {
@@ -55,7 +55,7 @@ serd_byte_source_init_buffer(SerdAllocator* const allocator,
}
SerdByteSource*
-serd_byte_source_new_input(SerdAllocator* const allocator,
+serd_byte_source_new_input(ZixAllocator* const allocator,
SerdInputStream* const input,
const SerdNode* const name,
const size_t block_size)
@@ -73,7 +73,7 @@ serd_byte_source_new_input(SerdAllocator* const allocator,
}
SerdByteSource* source =
- (SerdByteSource*)serd_acalloc(allocator, 1, sizeof(SerdByteSource));
+ (SerdByteSource*)zix_calloc(allocator, 1, sizeof(SerdByteSource));
if (!source) {
serd_node_free(allocator, source_name);
@@ -91,7 +91,7 @@ serd_byte_source_new_input(SerdAllocator* const allocator,
serd_byte_source_init_buffer(allocator, source);
if (block_size > 1 && !source->block) {
serd_node_free(allocator, source_name);
- serd_afree(allocator, source);
+ zix_free(allocator, source);
return NULL;
}
@@ -99,16 +99,16 @@ serd_byte_source_new_input(SerdAllocator* const allocator,
}
void
-serd_byte_source_free(SerdAllocator* const allocator,
+serd_byte_source_free(ZixAllocator* const allocator,
SerdByteSource* const source)
{
if (source) {
if (source->block_size > 1) {
- serd_aaligned_free(allocator, source->block);
+ zix_aligned_free(allocator, source->block);
}
serd_node_free(allocator, source->name);
- serd_afree(allocator, source);
+ zix_free(allocator, source);
}
}