summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-09 18:11:40 +0000
committerDavid Robillard <d@drobilla.net>2011-03-09 18:11:40 +0000
commit027ca551e53800ab7a2cd8375d1cacb980803d75 (patch)
tree5dcd8281dcc4f83ddc07fc047656b57b3d12b74e /src/port.c
parent97304fcdaa125bf1bfec30fa0d92b619faa41ea2 (diff)
downloadlilv-027ca551e53800ab7a2cd8375d1cacb980803d75.tar.gz
lilv-027ca551e53800ab7a2cd8375d1cacb980803d75.tar.bz2
lilv-027ca551e53800ab7a2cd8375d1cacb980803d75.zip
New collections and iterator API.
Deprecate slv2_*_get_at. Remove slv2_world_get_plugins_by_filter. git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3057 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/port.c b/src/port.c
index cb96bf9..6ae6a08 100644
--- a/src/port.c
+++ b/src/port.c
@@ -57,8 +57,8 @@ slv2_port_is_a(SLV2Plugin plugin,
SLV2Port port,
SLV2Value port_class)
{
- for (unsigned i = 0; i < slv2_values_size(port->classes); ++i)
- if (slv2_value_equals(slv2_values_get_at(port->classes, i), port_class))
+ SLV2_FOREACH(i, port->classes)
+ if (slv2_value_equals(slv2_values_get(port->classes, i), port_class))
return true;
return false;
@@ -209,7 +209,7 @@ slv2_port_get_name(SLV2Plugin p,
SLV2Value ret = NULL;
if (results) {
- SLV2Value val = slv2_values_get_at(results, 0);
+ SLV2Value val = slv2_values_get_first(results);
if (slv2_value_is_string(val))
ret = slv2_value_duplicate(val);
slv2_values_free(results);
@@ -242,7 +242,7 @@ slv2_port_get_range(SLV2Plugin p,
SLV2Values defaults = slv2_port_get_value_by_node(
p, port, p->world->lv2_default_node);
*def = defaults
- ? slv2_value_duplicate(slv2_values_get_at(defaults, 0))
+ ? slv2_value_duplicate(slv2_values_get_first(defaults))
: NULL;
slv2_values_free(defaults);
}
@@ -250,7 +250,7 @@ slv2_port_get_range(SLV2Plugin p,
SLV2Values minimums = slv2_port_get_value_by_node(
p, port, p->world->lv2_minimum_node);
*min = minimums
- ? slv2_value_duplicate(slv2_values_get_at(minimums, 0))
+ ? slv2_value_duplicate(slv2_values_get_first(minimums))
: NULL;
slv2_values_free(minimums);
}
@@ -258,7 +258,7 @@ slv2_port_get_range(SLV2Plugin p,
SLV2Values maximums = slv2_port_get_value_by_node(
p, port, p->world->lv2_maximum_node);
*max = maximums
- ? slv2_value_duplicate(slv2_values_get_at(maximums, 0))
+ ? slv2_value_duplicate(slv2_values_get_first(maximums))
: NULL;
slv2_values_free(maximums);
}