aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/uri.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-12-19 17:55:02 -0500
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit0f9816d67bc67a396607291f845ca2a33c2285a7 (patch)
treeb31fd1b344305dc984a2109084fa183573a0ae43 /include/serd/uri.h
parent258ea2ff59bbd2127ea446cf4b9676ad3d7fe53d (diff)
downloadserd-0f9816d67bc67a396607291f845ca2a33c2285a7.tar.gz
serd-0f9816d67bc67a396607291f845ca2a33c2285a7.tar.bz2
serd-0f9816d67bc67a396607291f845ca2a33c2285a7.zip
Use ZixAllocator directly
Diffstat (limited to 'include/serd/uri.h')
-rw-r--r--include/serd/uri.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/serd/uri.h b/include/serd/uri.h
index efdf68aa..ef00351c 100644
--- a/include/serd/uri.h
+++ b/include/serd/uri.h
@@ -5,8 +5,8 @@
#define SERD_URI_H
#include "serd/attributes.h"
-#include "serd/memory.h"
#include "serd/stream.h"
+#include "zix/allocator.h"
#include "zix/attributes.h"
#include "zix/string_view.h"
@@ -54,16 +54,17 @@ static const SerdURIView SERD_URI_NULL =
/**
Get the unescaped path and hostname from a file URI.
- The returned path and `*hostname` must be freed with serd_free().
+ Both the returned path and `*hostname` must be freed with zix_free() using
+ the same allocator.
@param allocator Allocator for the returned string.
@param uri A file URI.
- @param hostname If non-NULL, set to the hostname, if present.
+ @param hostname If non-NULL, set to the newly allocated hostname, if present.
- @return A newly allocated path string that must be freed with serd_free().
+ @return A newly allocated path string.
*/
SERD_API char* ZIX_ALLOCATED
-serd_parse_file_uri(SerdAllocator* ZIX_NULLABLE allocator,
+serd_parse_file_uri(ZixAllocator* ZIX_NULLABLE allocator,
const char* ZIX_NONNULL uri,
char* ZIX_NONNULL* ZIX_NULLABLE hostname);