From 6f5f093a2152a9cf76c756c49a75aa319ea05034 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 28 Sep 2011 21:31:57 +0000 Subject: Remove glib dependency git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3501 a436a847-0d15-0410-975c-d299462d15a1 --- src/lilv_internal.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/lilv_internal.h') diff --git a/src/lilv_internal.h b/src/lilv_internal.h index 770f144..03252a3 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -36,11 +36,11 @@ static inline char* dlerror(void) { return "Unknown error"; } # include #endif -#include - #include "serd/serd.h" #include "sord/sord.h" +#include "zix/tree.h" + #include "lilv-config.h" #include "lilv/lilv.h" @@ -76,7 +76,7 @@ struct LilvSpecImpl { /** Header of an LilvPlugin, LilvPluginClass, or LilvUI. Any of these structs may be safely casted to LilvHeader, which is used to - implement sequences without code duplication (see lilv_sequence_get_by_uri). + implement collections using the same comparator. */ struct LilvHeader { LilvWorld* world; @@ -244,19 +244,11 @@ const SordNode* lilv_node_as_node(const LilvNode* value); int lilv_header_compare_by_uri(const void* a, const void* b, void* user_data); -static inline void -lilv_sequence_insert(GSequence* seq, void* value) -{ - g_sequence_insert_sorted(seq, value, lilv_header_compare_by_uri, NULL); -} - -static inline void -lilv_array_append(GSequence* seq, void* value) { - g_sequence_append(seq, value); -} +int +lilv_ptr_cmp(const void* a, const void* b, void* user_data); struct LilvHeader* -lilv_sequence_get_by_uri(const GSequence* seq, const LilvNode* uri); +lilv_collection_get_by_uri(const ZixTree* seq, const LilvNode* uri); LilvScalePoint* lilv_scale_point_new(LilvNode* value, LilvNode* label); void lilv_scale_point_free(LilvScalePoint* point); -- cgit v1.2.1