diff options
author | David Robillard <d@drobilla.net> | 2011-02-04 05:23:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-04 05:23:45 +0000 |
commit | ea4087e0029c4f6c6f80716b50ddf60120598b1b (patch) | |
tree | ba9294615965a89001baa8a2aef3f85a621105cd /src | |
parent | b2789940c700c882bf59eedac74487db54a0b3d5 (diff) | |
download | lilv-ea4087e0029c4f6c6f80716b50ddf60120598b1b.tar.gz lilv-ea4087e0029c4f6c6f80716b50ddf60120598b1b.tar.bz2 lilv-ea4087e0029c4f6c6f80716b50ddf60120598b1b.zip |
Update for uint8_t sord API.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2907 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/plugin.c | 4 | ||||
-rw-r--r-- | src/port.c | 6 | ||||
-rw-r--r-- | src/query.c | 8 | ||||
-rw-r--r-- | src/slv2_internal.h | 2 | ||||
-rw-r--r-- | src/util.c | 4 | ||||
-rw-r--r-- | src/value.c | 2 | ||||
-rw-r--r-- | src/world.c | 4 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/plugin.c b/src/plugin.c index aa4a7a4..1533ac6 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -437,7 +437,7 @@ SLV2Values slv2_plugin_get_value_by_qname(SLV2Plugin p, const char* predicate) { - char* pred_uri = slv2_qname_expand(p, predicate); + char* pred_uri = (char*)slv2_qname_expand(p, predicate); if (!pred_uri) { return NULL; } @@ -453,7 +453,7 @@ SLV2Values slv2_plugin_get_value_by_qname_i18n(SLV2Plugin p, const char* predicate) { - char* pred_uri = slv2_qname_expand(p, predicate); + uint8_t* pred_uri = slv2_qname_expand(p, predicate); if (!pred_uri) { return NULL; } @@ -155,7 +155,7 @@ slv2_port_get_value_by_qname(SLV2Plugin p, const char* predicate) { assert(predicate); - char* pred_uri = slv2_qname_expand(p, predicate); + uint8_t* pred_uri = slv2_qname_expand(p, predicate); if (!pred_uri) { return NULL; } @@ -164,7 +164,7 @@ slv2_port_get_value_by_qname(SLV2Plugin p, SLV2Matches results = slv2_plugin_find_statements( p, port_node, - sord_get_uri(p->world->model, true, (const uint8_t*)pred_uri), + sord_get_uri(p->world->model, true, pred_uri), NULL); free(pred_uri); @@ -209,7 +209,7 @@ slv2_port_get_value_by_qname_i18n(SLV2Plugin p, const char* predicate) { assert(predicate); - char* pred_uri = slv2_qname_expand(p, predicate); + uint8_t* pred_uri = slv2_qname_expand(p, predicate); if (!pred_uri) { return NULL; } diff --git a/src/query.c b/src/query.c index 71ed613..9154990 100644 --- a/src/query.c +++ b/src/query.c @@ -51,8 +51,8 @@ slv2_values_from_stream_i18n(SLV2Plugin p, if (lang) { if (!strcmp(lang, slv2_get_lang())) { g_ptr_array_add( - values, slv2_value_new_string( - p->world, sord_node_get_string(value))); + values, (uint8_t*)slv2_value_new_string( + p->world, (const char*)sord_node_get_string(value))); } } else { nolang = value; @@ -66,8 +66,8 @@ slv2_values_from_stream_i18n(SLV2Plugin p, // No value with a matching language, use untranslated default if (nolang) { g_ptr_array_add( - values, slv2_value_new_string( - p->world, sord_node_get_string(nolang))); + values, (uint8_t*)slv2_value_new_string( + p->world, (const char*)sord_node_get_string(nolang))); } else { slv2_values_free(values); values = NULL; diff --git a/src/slv2_internal.h b/src/slv2_internal.h index 6725a67..1c87a5e 100644 --- a/src/slv2_internal.h +++ b/src/slv2_internal.h @@ -320,7 +320,7 @@ SLV2Values slv2_values_from_stream_i18n(SLV2Plugin p, char* slv2_strjoin(const char* first, ...); const char* slv2_get_lang(); -char* slv2_qname_expand(SLV2Plugin p, const char* qname); +uint8_t* slv2_qname_expand(SLV2Plugin p, const char* qname); /* ********* Dynamic Manifest ********* */ #ifdef SLV2_DYN_MANIFEST @@ -86,7 +86,7 @@ slv2_get_lang() return lang; } -char* +uint8_t* slv2_qname_expand(SLV2Plugin p, const char* qname) { const size_t qname_len = strlen(qname); @@ -101,7 +101,7 @@ slv2_qname_expand(SLV2Plugin p, const char* qname) memcpy(uri, uri_prefix.buf, uri_prefix.len); memcpy(uri + uri_prefix.len, uri_suffix.buf, uri_suffix.len); uri[uri_len] = '\0'; - return uri; + return (uint8_t*)uri; } else { SLV2_ERRORF("Failed to expand QName `%s'\n", qname); return NULL; diff --git a/src/value.c b/src/value.c index 8e63edc..ff74f9e 100644 --- a/src/value.c +++ b/src/value.c @@ -73,7 +73,7 @@ slv2_value_new(SLV2World world, SLV2ValueType type, const char* str) switch (type) { case SLV2_VALUE_URI: - val->val.uri_val = sord_get_uri(world->model, true, str); + val->val.uri_val = sord_get_uri(world->model, true, (const uint8_t*)str); assert(val->val.uri_val); val->str_val = (char*)sord_node_get_string(val->val.uri_val); break; diff --git a/src/world.c b/src/world.c index 4c9fce8..454fdec 100644 --- a/src/world.c +++ b/src/world.c @@ -59,7 +59,7 @@ slv2_world_new() #define NS_DYNMAN (const uint8_t*)"http://lv2plug.in/ns/ext/dynmanifest#" -#define NEW_URI(uri) sord_get_uri(world->model, true, (const char*)uri) +#define NEW_URI(uri) sord_get_uri(world->model, true, uri) world->dyn_manifest_node = NEW_URI(NS_DYNMAN "DynManifest"); world->lv2_specification_node = NEW_URI(SLV2_NS_LV2 "Specification"); @@ -384,7 +384,7 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri) SordTuple see_also_tup = { slv2_node_copy(spec), world->rdfs_seealso_node, - sord_get_uri(world->model, true, (const char*)manifest_uri.buf), + sord_get_uri(world->model, true, manifest_uri.buf), NULL }; sord_add(world->model, see_also_tup); |