summaryrefslogtreecommitdiffstats
path: root/src/query.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-29 02:03:23 +0000
committerDavid Robillard <d@drobilla.net>2011-04-29 02:03:23 +0000
commitb4cd6dd752c8da20e61abd3774bf9302724a773f (patch)
tree0f3ba5dc84d8bdbf094da63d1f20ef928a803b0f /src/query.c
parent7aa935080bae3299dbfab41955ed93d6b68f39bf (diff)
downloadlilv-b4cd6dd752c8da20e61abd3774bf9302724a773f.tar.gz
lilv-b4cd6dd752c8da20e61abd3774bf9302724a773f.tar.bz2
lilv-b4cd6dd752c8da20e61abd3774bf9302724a773f.zip
Don't hide pointers behind typedefs.
Use const appropriately in API (makes it clear from the type whether objects should be freed or not). git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3222 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/query.c')
-rw-r--r--src/query.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/query.c b/src/query.c
index b82256c..d84a20f 100644
--- a/src/query.c
+++ b/src/query.c
@@ -24,10 +24,10 @@
#include "lilv_internal.h"
LilvMatches
-lilv_plugin_find_statements(LilvPlugin plugin,
- LilvNode subject,
- LilvNode predicate,
- LilvNode object)
+lilv_plugin_find_statements(const LilvPlugin* plugin,
+ LilvNode subject,
+ LilvNode predicate,
+ LilvNode object)
{
lilv_plugin_load_if_necessary(plugin);
SordQuad pat = { subject, predicate, object, NULL };
@@ -64,14 +64,14 @@ lilv_lang_matches(const char* a, const char* b)
return LILV_LANG_MATCH_NONE;
}
-LilvValues
-lilv_values_from_stream_objects_i18n(LilvPlugin p,
- LilvMatches stream)
+LilvValues*
+lilv_values_from_stream_objects_i18n(const LilvPlugin* p,
+ LilvMatches stream)
{
- LilvValues values = lilv_values_new();
- LilvNode nolang = NULL; // Untranslated value
- LilvNode partial = NULL; // Partial language match
- char* syslang = lilv_get_lang();
+ LilvValues* values = lilv_values_new();
+ LilvNode nolang = NULL; // Untranslated value
+ LilvNode partial = NULL; // Partial language match
+ char* syslang = lilv_get_lang();
FOREACH_MATCH(stream) {
LilvNode value = lilv_match_object(stream);
if (sord_node_get_type(value) == SORD_LITERAL) {
@@ -127,9 +127,9 @@ lilv_values_from_stream_objects_i18n(LilvPlugin p,
return values;
}
-LilvValues
-lilv_values_from_stream_objects(LilvPlugin p,
- LilvMatches stream)
+LilvValues*
+lilv_values_from_stream_objects(const LilvPlugin* p,
+ LilvMatches stream)
{
if (lilv_matches_end(stream)) {
lilv_match_end(stream);
@@ -137,7 +137,7 @@ lilv_values_from_stream_objects(LilvPlugin p,
} else if (p->world->opt.filter_language) {
return lilv_values_from_stream_objects_i18n(p, stream);
} else {
- LilvValues values = lilv_values_new();
+ LilvValues* values = lilv_values_new();
FOREACH_MATCH(stream) {
lilv_array_append(
values,