summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pluginlist.c19
-rw-r--r--src/query.c6
2 files changed, 12 insertions, 13 deletions
diff --git a/src/pluginlist.c b/src/pluginlist.c
index 2879e53..8c5ba11 100644
--- a/src/pluginlist.c
+++ b/src/pluginlist.c
@@ -77,14 +77,13 @@ void
slv2_list_load_bundle(SLV2List list,
const char* bundle_base_uri)
{
- // FIXME: ew
unsigned char* manifest_uri = malloc(
(strlen((char*)bundle_base_uri) + strlen("manifest.ttl") + 2) * sizeof(unsigned char));
memcpy(manifest_uri, bundle_base_uri, strlen((char*)bundle_base_uri)+1 * sizeof(unsigned char));
- if (bundle_base_uri[strlen((char*)bundle_base_uri)-1] == '/')
- strcat((char*)manifest_uri, (char*)"manifest.ttl");
+ if (bundle_base_uri[strlen(bundle_base_uri)-1] == '/')
+ strcat((char*)manifest_uri, "manifest.ttl");
else
- strcat((char*)manifest_uri, (char*)"/manifest.ttl");
+ strcat((char*)manifest_uri, "/manifest.ttl");
rasqal_init();
rasqal_query_results *results;
@@ -113,17 +112,17 @@ slv2_list_load_bundle(SLV2List list,
rasqal_literal* literal = NULL;
- literal = rasqal_query_results_get_binding_value_by_name(results, "plugin_uri");
+ literal = rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)"plugin_uri");
if (literal)
- new_plugin->plugin_uri = strdup(rasqal_literal_as_string(literal));
+ new_plugin->plugin_uri = strdup((const char*)rasqal_literal_as_string(literal));
- literal = rasqal_query_results_get_binding_value_by_name(results, "data_url");
+ literal = rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)"data_url");
if (literal)
- new_plugin->data_url = strdup(rasqal_literal_as_string(literal));
+ new_plugin->data_url = strdup((const char*)rasqal_literal_as_string(literal));
- literal = rasqal_query_results_get_binding_value_by_name(results, "lib_url");
+ literal = rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)"lib_url");
if (literal)
- new_plugin->lib_url = strdup(rasqal_literal_as_string(literal));
+ new_plugin->lib_url = strdup((const char*)rasqal_literal_as_string(literal));
/* Add the plugin if it's valid */
if (new_plugin->lib_url && new_plugin->data_url && new_plugin->plugin_uri
diff --git a/src/query.c b/src/query.c
index 8f3ef40..56903ac 100644
--- a/src/query.c
+++ b/src/query.c
@@ -89,7 +89,7 @@ slv2_query_get_num_results(rasqal_query_results* results, const char* var_name)
size_t result = 0;
while (!rasqal_query_results_finished(results)) {
- if (!strcmp(rasqal_query_results_get_binding_name(results, 0), var_name)) {
+ if (!strcmp((const char*)rasqal_query_results_get_binding_name(results, 0), var_name)) {
++result;
}
rasqal_query_results_next(results);
@@ -112,7 +112,7 @@ slv2_query_get_results(rasqal_query_results* results, const char* var_name)
while (!rasqal_query_results_finished(results)) {
rasqal_literal* literal =
- rasqal_query_results_get_binding_value_by_name(results, var_name);
+ rasqal_query_results_get_binding_value_by_name(results, (const unsigned char*)var_name);
assert(literal != NULL);
// Add value on to the array, reallocing all the way.
@@ -120,7 +120,7 @@ slv2_query_get_results(rasqal_query_results* results, const char* var_name)
// results API. coincidentally.
result->num_values++;
result->values = realloc(result->values, result->num_values * sizeof(char*));
- result->values[result->num_values-1] = strdup(rasqal_literal_as_string(literal));
+ result->values[result->num_values-1] = strdup((const char*)rasqal_literal_as_string(literal));
rasqal_query_results_next(results);
}