summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--lilv/lilv.h2
-rw-r--r--src/plugin.c10
-rw-r--r--test/lilv_test.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 55f39f2..257ecc8 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ lilv (0.15.0) unstable;
* Add lilv_world_ask() for simply checking if a statement exists.
* Add lilv_nodes_merge().
+ * Make lilv_plugin_get_port_by_designation() return a const pointer.
* Support atom:supports in lilv_port_supports_event().
* Add va_list variant of lilv_plugin_get_num_ports_of_class().
* Correctly depend on serd at build time (fix compilation in odd cases)
@@ -9,7 +10,7 @@ lilv (0.15.0) unstable;
* lilvmm.hpp: Support varargs for Plugin::get_num_ports_of_class()
* Update to waf 1.7.8 and autowaf r90 (install docs to versioned directory)
- -- David Robillard <d@drobilla.net> Sat, 22 Dec 2012 20:16:12 -0500
+ -- David Robillard <d@drobilla.net> Wed, 09 Jan 2013 21:16:23 -0500
lilv (0.14.4) stable;
diff --git a/lilv/lilv.h b/lilv/lilv.h
index 52e3576..9d50def 100644
--- a/lilv/lilv.h
+++ b/lilv/lilv.h
@@ -946,7 +946,7 @@ lilv_plugin_get_port_by_symbol(const LilvPlugin* plugin,
ports for a particular designation.
*/
LILV_API
-LilvPort*
+const LilvPort*
lilv_plugin_get_port_by_designation(const LilvPlugin* plugin,
const LilvNode* port_class,
const LilvNode* designation);
diff --git a/src/plugin.c b/src/plugin.c
index 3386e02..4952f01 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -612,7 +612,7 @@ lilv_plugin_has_latency(const LilvPlugin* p)
return ret;
}
-static LilvPort*
+static const LilvPort*
lilv_plugin_get_port_by_property(const LilvPlugin* plugin,
const LilvNode* port_property)
{
@@ -637,7 +637,7 @@ lilv_plugin_get_port_by_property(const LilvPlugin* plugin,
}
LILV_API
-LilvPort*
+const LilvPort*
lilv_plugin_get_port_by_designation(const LilvPlugin* plugin,
const LilvNode* port_class,
const LilvNode* designation)
@@ -668,10 +668,10 @@ LILV_API
uint32_t
lilv_plugin_get_latency_port_index(const LilvPlugin* p)
{
- LilvNode* property = lilv_node_new_from_node(
+ LilvNode* prop = lilv_node_new_from_node(
p->world, p->world->uris.lv2_reportsLatency);
- LilvPort* latency_port = lilv_plugin_get_port_by_property(p, property);
- lilv_node_free(property);
+ const LilvPort* latency_port = lilv_plugin_get_port_by_property(p, prop);
+ lilv_node_free(prop);
return latency_port ? latency_port->index : UINT32_MAX;
}
diff --git a/test/lilv_test.c b/test/lilv_test.c
index 48fafa5..f6976f6 100644
--- a/test/lilv_test.c
+++ b/test/lilv_test.c
@@ -625,7 +625,7 @@ test_plugin(void)
LilvNode* lv2_latency = lilv_new_uri(world,
"http://lv2plug.in/ns/lv2core#latency");
- LilvPort* latency_port = lilv_plugin_get_port_by_designation(
+ const LilvPort* latency_port = lilv_plugin_get_port_by_designation(
plug, out_class, lv2_latency);
lilv_node_free(lv2_latency);