summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lilv_internal.h9
-rw-r--r--src/node.c2
-rw-r--r--src/world.c14
3 files changed, 12 insertions, 13 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h
index 9698fe9..770f144 100644
--- a/src/lilv_internal.h
+++ b/src/lilv_internal.h
@@ -67,9 +67,10 @@ struct LilvPortImpl {
struct LilvSpecImpl {
- SordNode* spec;
- SordNode* bundle;
- LilvNodes* data_uris;
+ SordNode* spec;
+ SordNode* bundle;
+ LilvNodes* data_uris;
+ struct LilvSpecImpl* next;
};
/**
@@ -115,7 +116,7 @@ struct LilvWorldImpl {
unsigned n_read_files;
LilvPluginClass* lv2_plugin_class;
LilvPluginClasses* plugin_classes;
- GSList* specs;
+ LilvSpec* specs;
LilvPlugins* plugins;
SordNode* dc_replaces_node;
SordNode* dyn_manifest_node;
diff --git a/src/node.c b/src/node.c
index 918bdd0..ccccf88 100644
--- a/src/node.c
+++ b/src/node.c
@@ -21,8 +21,6 @@
#include <stdlib.h>
#include <string.h>
-#include <glib.h>
-
#include "lilv_internal.h"
static void
diff --git a/src/world.c b/src/world.c
index 14f1fe9..9cb00ac 100644
--- a/src/world.c
+++ b/src/world.c
@@ -135,14 +135,14 @@ lilv_world_free(LilvWorld* world)
lilv_node_free(world->lv2_optionalFeature_val);
lilv_node_free(world->lv2_requiredFeature_val);
- for (GSList* l = world->specs; l; l = l->next) {
- LilvSpec* spec = (LilvSpec*)l->data;
+ for (LilvSpec* spec = world->specs; spec;) {
+ LilvSpec* next = spec->next;
sord_node_free(world->world, spec->spec);
sord_node_free(world->world, spec->bundle);
lilv_nodes_free(spec->data_uris);
free(spec);
+ spec = next;
}
- g_slist_free(world->specs);
world->specs = NULL;
LILV_FOREACH(plugins, i, world->plugins) {
@@ -333,8 +333,9 @@ lilv_world_add_spec(LilvWorld* world,
}
lilv_match_end(files);
- // Add specification to world specification sequence
- world->specs = g_slist_prepend(world->specs, spec);
+ // Add specification to world specification list
+ spec->next = world->specs;
+ world->specs = spec;
}
static void
@@ -681,8 +682,7 @@ lilv_world_load_path(LilvWorld* world,
static void
lilv_world_load_specifications(LilvWorld* world)
{
- for (GSList* l = world->specs; l; l = l->next) {
- LilvSpec* spec = (LilvSpec*)l->data;
+ for (LilvSpec* spec = world->specs; spec; spec = spec->next) {
LILV_FOREACH(nodes, f, spec->data_uris) {
LilvNode* file = lilv_collection_get(spec->data_uris, f);
const uint8_t* file_uri = (const uint8_t*)lilv_node_as_uri(file);