diff options
author | David Robillard <d@drobilla.net> | 2011-03-08 00:54:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-08 00:54:23 +0000 |
commit | a9bbabe7ff2d9ca96ab047ccb86c2698cfb2d7b3 (patch) | |
tree | 4d124d439d59aa7da04f818a000a2f966e63503b /src/plugin.c | |
parent | 27341a1b6bb661114184f93fadaf534d890e8498 (diff) | |
download | lilv-a9bbabe7ff2d9ca96ab047ccb86c2698cfb2d7b3.tar.gz lilv-a9bbabe7ff2d9ca96ab047ccb86c2698cfb2d7b3.tar.bz2 lilv-a9bbabe7ff2d9ca96ab047ccb86c2698cfb2d7b3.zip |
Use the same data structure for all collections (fix ticket #650).
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3054 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugin.c b/src/plugin.c index f2d1837..4159cdf 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -659,16 +659,14 @@ slv2_plugin_get_supported_features(SLV2Plugin p) unsigned n_optional = slv2_values_size(optional); unsigned n_required = slv2_values_size(required); for (unsigned i = 0 ; i < n_optional; ++i) - slv2_array_append(result, slv2_values_get_at(optional, i)); + slv2_array_append( + result, slv2_value_duplicate(slv2_values_get_at(optional, i))); for (unsigned i = 0 ; i < n_required; ++i) - slv2_array_append(result, slv2_values_get_at(required, i)); + slv2_array_append( + result, slv2_value_duplicate(slv2_values_get_at(required, i))); - if (optional) { - free(((GPtrArray*)optional)->pdata); - } - if (required) { - free(((GPtrArray*)required)->pdata); - } + slv2_values_free(optional); + slv2_values_free(required); return result; } |