From 6f36b5a3fb181f6b9f9b1538d894efe24a0e92c7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 13 Aug 2021 12:46:05 -0400 Subject: fixup! WIP: Port to serd1 --- src/node.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/node.c') diff --git a/src/node.c b/src/node.c index f10ed91..098298f 100644 --- a/src/node.c +++ b/src/node.c @@ -31,7 +31,7 @@ LilvNode* lilv_new_uri(LilvWorld* world, const char* uri) { (void)world; - return serd_new_uri(SERD_MEASURE_STRING(uri)); + return serd_new_uri(SERD_STRING(uri)); } LilvNode* @@ -40,8 +40,8 @@ lilv_new_file_uri(LilvWorld* world, const char* host, const char* path) (void)world; char* abs_path = lilv_path_absolute(path); - SerdNode* s = - serd_new_file_uri(SERD_MEASURE_STRING(abs_path), SERD_MEASURE_STRING(host)); + SerdNode* s = serd_new_file_uri( + SERD_STRING(abs_path), host ? SERD_STRING(host) : SERD_EMPTY_STRING()); free(abs_path); return s; @@ -52,7 +52,7 @@ lilv_new_string(LilvWorld* world, const char* str) { (void)world; - return serd_new_string(SERD_MEASURE_STRING(str)); + return serd_new_string(SERD_STRING(str)); } LilvNode* @@ -60,7 +60,7 @@ lilv_new_int(LilvWorld* world, int val) { (void)world; - return serd_new_integer(val, world->uris.xsd_int); + return serd_new_integer(val, serd_node_string_view(world->uris.xsd_int)); } LilvNode* @@ -76,9 +76,7 @@ lilv_new_bool(LilvWorld* world, bool val) { (void)world; - return serd_new_typed_literal(val ? SERD_STATIC_STRING("true") - : SERD_STATIC_STRING("false"), - serd_node_string_view(world->uris.xsd_boolean)); + return serd_new_boolean(val); } LilvNode* -- cgit v1.2.1