From 43e4cba8561d332cdc0fa9d257008dc68bb65a96 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Feb 2018 18:35:41 +0100 Subject: Make nodes opaque --- src/serdi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/serdi.c') diff --git a/src/serdi.c b/src/serdi.c index 419d3d06..571e2208 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -221,8 +221,8 @@ main(int argc, char** argv) : SERD_NQUADS); } - SerdURI base_uri = SERD_URI_NULL; - SerdNode base = SERD_NODE_NULL; + SerdURI base_uri = SERD_URI_NULL; + SerdNode* base = NULL; if (a < argc) { // Base URI given on command line base = serd_node_new_uri_from_string( (const char*)argv[a], NULL, &base_uri); @@ -231,7 +231,7 @@ main(int argc, char** argv) } FILE* out_fd = stdout; - SerdEnv* env = serd_env_new(&base); + SerdEnv* env = serd_env_new(base); int output_style = 0; if (output_syntax == SERD_NTRIPLES || ascii) { @@ -270,10 +270,11 @@ main(int argc, char** argv) serd_writer_set_error_sink(writer, quiet_error_sink, NULL); } - SerdNode root = serd_node_from_string(SERD_URI, root_uri); - serd_writer_set_root_uri(writer, &root); + SerdNode* root = serd_node_new_string(SERD_URI, root_uri); + serd_writer_set_root_uri(writer, root); serd_writer_chop_blank_prefix(writer, chop_prefix); serd_reader_add_blank_prefix(reader, add_prefix); + serd_node_free(root); SerdStatus status = SERD_SUCCESS; if (!from_file) { @@ -292,7 +293,7 @@ main(int argc, char** argv) serd_writer_finish(writer); serd_writer_free(writer); serd_env_free(env); - serd_node_free(&base); + serd_node_free(base); if (from_file) { fclose(in_fd); -- cgit v1.2.1