diff options
author | David Robillard <d@drobilla.net> | 2021-02-20 13:17:03 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-07 15:32:23 -0500 |
commit | 5ea69340e389163cfea54c16a466672b9b7284b8 (patch) | |
tree | e8240a625b3b23990658266d1113b0f86a41b38e /src/writer.c | |
parent | b4dee10576e9916c0c8d80033bc429dc38a70c1c (diff) | |
download | serd-5ea69340e389163cfea54c16a466672b9b7284b8.tar.gz serd-5ea69340e389163cfea54c16a466672b9b7284b8.tar.bz2 serd-5ea69340e389163cfea54c16a466672b9b7284b8.zip |
Rename SerdURI to SerdURIView
Diffstat (limited to 'src/writer.c')
-rw-r--r-- | src/writer.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/writer.c b/src/writer.c index e97af301..c365f23c 100644 --- a/src/writer.c +++ b/src/writer.c @@ -96,8 +96,8 @@ struct SerdWriterImpl { SerdStyle style; SerdEnv* env; SerdNode root_node; - SerdURI root_uri; - SerdURI base_uri; + SerdURIView root_uri; + SerdURIView base_uri; SerdStack anon_stack; SerdByteSink byte_sink; SerdErrorSink error_sink; @@ -151,7 +151,7 @@ w_err(SerdWriter* writer, SerdStatus st, const char* fmt, ...) } static inline SERD_PURE_FUNC WriteContext* -anon_stack_top(SerdWriter* writer) + anon_stack_top(SerdWriter* writer) { assert(!serd_stack_is_empty(&writer->anon_stack)); return (WriteContext*)(writer->anon_stack.buf + writer->anon_stack.size - @@ -600,14 +600,14 @@ write_uri_node(SerdWriter* const writer, write_sep(writer, SEP_URI_BEGIN); if (writer->style & SERD_STYLE_RESOLVED) { - SerdURI in_base_uri; - SerdURI uri; - SerdURI abs_uri; + SerdURIView in_base_uri; + SerdURIView uri; + SerdURIView abs_uri; serd_env_get_base_uri(writer->env, &in_base_uri); serd_uri_parse(node->buf, &uri); serd_uri_resolve(&uri, &in_base_uri, &abs_uri); - bool rooted = uri_is_under(&writer->base_uri, &writer->root_uri); - SerdURI* root = rooted ? &writer->root_uri : &writer->base_uri; + bool rooted = uri_is_under(&writer->base_uri, &writer->root_uri); + SerdURIView* root = rooted ? &writer->root_uri : &writer->base_uri; if (!uri_is_under(&abs_uri, root) || writer->syntax == SERD_NTRIPLES || writer->syntax == SERD_NQUADS) { serd_uri_serialise(&abs_uri, uri_sink, writer); @@ -952,12 +952,12 @@ serd_writer_finish(SerdWriter* writer) } SerdWriter* -serd_writer_new(SerdSyntax syntax, - SerdStyle style, - SerdEnv* env, - const SerdURI* base_uri, - SerdSink ssink, - void* stream) +serd_writer_new(SerdSyntax syntax, + SerdStyle style, + SerdEnv* env, + const SerdURIView* base_uri, + SerdSink ssink, + void* stream) { const WriteContext context = WRITE_CONTEXT_NULL; SerdWriter* writer = (SerdWriter*)calloc(1, sizeof(SerdWriter)); |