aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uri.c')
-rw-r--r--src/uri.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/uri.c b/src/uri.c
index 53574600..9dc09fe6 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -1,15 +1,14 @@
// Copyright 2011-2023 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
-#include "memory.h"
#include "string_utils.h"
#include "uri_utils.h"
#include "serd/buffer.h"
-#include "serd/memory.h"
#include "serd/status.h"
#include "serd/stream.h"
#include "serd/uri.h"
+#include "zix/allocator.h"
#include "zix/string_view.h"
#include <assert.h>
@@ -26,9 +25,9 @@ write_file_uri_char(const char c, void* const stream)
}
static char*
-parse_hostname(SerdAllocator* const allocator,
- const char* const authority,
- char** const hostname)
+parse_hostname(ZixAllocator* const allocator,
+ const char* const authority,
+ char** const hostname)
{
char* const path = strchr(authority, '/');
if (!path) {
@@ -37,7 +36,7 @@ parse_hostname(SerdAllocator* const allocator,
if (hostname) {
const size_t len = (size_t)(path - authority);
- if (!(*hostname = (char*)serd_acalloc(allocator, len + 1, 1))) {
+ if (!(*hostname = (char*)zix_calloc(allocator, len + 1, 1))) {
return NULL;
}
@@ -48,9 +47,9 @@ parse_hostname(SerdAllocator* const allocator,
}
char*
-serd_parse_file_uri(SerdAllocator* const allocator,
- const char* const uri,
- char** const hostname)
+serd_parse_file_uri(ZixAllocator* const allocator,
+ const char* const uri,
+ char** const hostname)
{
assert(uri);
@@ -95,7 +94,7 @@ serd_parse_file_uri(SerdAllocator* const allocator,
}
if (st || serd_buffer_close(&buffer)) {
- serd_free(allocator, buffer.buf);
+ zix_free(allocator, buffer.buf);
return NULL;
}