summaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-28 14:26:47 +0000
committerDavid Robillard <d@drobilla.net>2011-09-28 14:26:47 +0000
commitfe43ff5fe29d5bbe59ead086782131144e451dc6 (patch)
tree02f61a44871e39405cc99256271ad3cd7893e6a2 /src/world.c
parentec0b7f8db95b11bdb4d87a349be42148ff5d99f5 (diff)
downloadlilv-fe43ff5fe29d5bbe59ead086782131144e451dc6.tar.gz
lilv-fe43ff5fe29d5bbe59ead086782131144e451dc6.tar.bz2
lilv-fe43ff5fe29d5bbe59ead086782131144e451dc6.zip
Remove use of GSList.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3500 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c14
1 files changed, 7 insertions, 7 deletions
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);