diff options
author | David Robillard <d@drobilla.net> | 2013-01-15 16:52:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-15 16:52:20 +0000 |
commit | a0ce6e18af34a8597e6fe0bc39d1f31737e7ef01 (patch) | |
tree | 260039c82763559bf044fa83751b22c188e73b9b | |
parent | 68cdd691abaf1419cdcf6bb93a43782e849795f6 (diff) | |
download | lilv-a0ce6e18af34a8597e6fe0bc39d1f31737e7ef01.tar.gz lilv-a0ce6e18af34a8597e6fe0bc39d1f31737e7ef01.tar.bz2 lilv-a0ce6e18af34a8597e6fe0bc39d1f31737e7ef01.zip |
Fix several plugin functions that failed to load data if called first.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4990 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | src/plugin.c | 6 |
2 files changed, 12 insertions, 5 deletions
@@ -1,10 +1,11 @@ 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(). + * 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() + * Fix several plugin functions that failed to load data if called first * Correctly depend on serd at build time (fix compilation in odd cases) * Disable timestamps in HTML documentation for reproducible build * lilvmm.hpp: Support varargs for Plugin::get_num_ports_of_class() diff --git a/src/plugin.c b/src/plugin.c index 4952f01..7e33495 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -680,6 +680,7 @@ bool lilv_plugin_has_feature(const LilvPlugin* p, const LilvNode* feature) { + lilv_plugin_load_if_necessary(p); const SordNode* predicates[] = { p->world->uris.lv2_requiredFeature, p->world->uris.lv2_optionalFeature, NULL }; @@ -709,6 +710,7 @@ LILV_API LilvNodes* lilv_plugin_get_optional_features(const LilvPlugin* p) { + lilv_plugin_load_if_necessary(p); return lilv_world_find_nodes_internal(p->world, p->plugin_uri->node, p->world->uris.lv2_optionalFeature, @@ -719,6 +721,7 @@ LILV_API LilvNodes* lilv_plugin_get_required_features(const LilvPlugin* p) { + lilv_plugin_load_if_necessary(p); return lilv_world_find_nodes_internal(p->world, p->plugin_uri->node, p->world->uris.lv2_requiredFeature, @@ -736,6 +739,7 @@ lilv_plugin_has_extension_data(const LilvPlugin* p, return false; } + lilv_plugin_load_if_necessary(p); return lilv_world_ask_internal( p->world, p->plugin_uri->node, @@ -947,6 +951,8 @@ LILV_API LilvNodes* lilv_plugin_get_related(const LilvPlugin* plugin, const LilvNode* type) { + lilv_plugin_load_if_necessary(plugin); + LilvWorld* const world = plugin->world; LilvNodes* const related = lilv_world_find_nodes_internal( world, |