aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-05 09:43:57 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit4711fdf527f416faee8ff19e15f050d4b48dcfb2 (patch)
tree6b18712ec44cce5713ddef1a21aec5f12651d901 /tools
parent248a874d7425749d29cf900a1c3783c624ea8d8c (diff)
downloadserd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.gz
serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.bz2
serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.zip
[WIP] Generalize node construction API
Diffstat (limited to 'tools')
-rw-r--r--tools/console.c4
-rw-r--r--tools/serd-pipe.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/tools/console.c b/tools/console.c
index 012c50a3..72b9b222 100644
--- a/tools/console.c
+++ b/tools/console.c
@@ -53,8 +53,8 @@ serd_set_base_uri_from_path(SerdEnv* const env, const char* const path)
return SERD_BAD_ARG;
}
- SerdNode* const file_uri =
- serd_new_file_uri(NULL, serd_string(input_path), serd_empty_string());
+ SerdNode* const file_uri = serd_node_new(
+ NULL, serd_a_file_uri(serd_string(input_path), serd_empty_string()));
serd_env_set_base_uri(env, serd_node_string_view(file_uri));
serd_node_free(NULL, file_uri);
diff --git a/tools/serd-pipe.c b/tools/serd-pipe.c
index 9be11d66..3f1c3f53 100644
--- a/tools/serd-pipe.c
+++ b/tools/serd-pipe.c
@@ -163,7 +163,7 @@ main(int argc, char** argv)
return missing_arg(prog, 'B');
}
- base = serd_new_uri(NULL, serd_string(argv[a]));
+ base = serd_node_new(NULL, serd_a_uri_string(argv[a]));
break;
} else if (opt == 'b') {
if (argv[a][o + 1] || ++a == argc) {
@@ -281,8 +281,9 @@ main(int argc, char** argv)
// Choose base URI from the single input path
char* const input_path = zix_canonical_path(NULL, inputs[0]);
if (!input_path ||
- !(base = serd_new_file_uri(
- NULL, serd_string(input_path), serd_empty_string()))) {
+ !(base = serd_node_new(
+ NULL,
+ serd_a_file_uri(serd_string(input_path), serd_empty_string())))) {
SERDI_ERRORF("unable to determine base URI from path %s\n", inputs[0]);
}
zix_free(NULL, input_path);