summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-28 04:46:31 +0000
committerDavid Robillard <d@drobilla.net>2011-04-28 04:46:31 +0000
commitc146a5d866ab26bcf277726109b7f1f91cce5e28 (patch)
tree5f08fdf69c9c0849d3b2093acab19639301363cb
parent58fc14d5a453b72c4df78808870d604ca378668a (diff)
downloadlilv-c146a5d866ab26bcf277726109b7f1f91cce5e28.tar.gz
lilv-c146a5d866ab26bcf277726109b7f1f91cce5e28.tar.bz2
lilv-c146a5d866ab26bcf277726109b7f1f91cce5e28.zip
Update for new Sord API.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3208 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/plugin.c8
-rw-r--r--src/slv2_internal.h66
-rw-r--r--src/value.c2
3 files changed, 38 insertions, 38 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 7b22707..5de6a1a 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -473,7 +473,7 @@ slv2_plugin_get_value_for_subject(SLV2Plugin p,
return NULL;
}
- SLV2Node subject_node = (slv2_value_is_uri(subject))
+ SordNode* subject_node = (slv2_value_is_uri(subject))
? slv2_node_copy(subject->val.uri_val)
: sord_new_blank(p->world->world,
(const uint8_t*)slv2_value_as_blank(subject));
@@ -698,7 +698,7 @@ slv2_plugin_get_port_by_symbol(SLV2Plugin p,
static SLV2Node
slv2_plugin_get_author(SLV2Plugin p)
{
- SLV2Node doap_maintainer = sord_new_uri(
+ SordNode* doap_maintainer = sord_new_uri(
p->world->world, NS_DOAP "maintainer");
SLV2Matches maintainers = slv2_plugin_find_statements(
@@ -769,8 +769,8 @@ SLV2_API
SLV2UIs
slv2_plugin_get_uis(SLV2Plugin p)
{
- SLV2Node ui_ui_node = sord_new_uri(p->world->world, NS_UI "ui");
- SLV2Node ui_binary_node = sord_new_uri(p->world->world, NS_UI "binary");
+ SordNode* ui_ui_node = sord_new_uri(p->world->world, NS_UI "ui");
+ SordNode* ui_binary_node = sord_new_uri(p->world->world, NS_UI "binary");
SLV2UIs result = slv2_uis_new();
SLV2Matches uis = slv2_plugin_find_statements(
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index 2ca71fe..e17eebd 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -60,20 +60,20 @@ static inline char* dlerror(void) { return "Unknown error"; }
#define SLV2_NS_XSD (const uint8_t*)"http://www.w3.org/2001/XMLSchema#"
#define SLV2_NS_RDF (const uint8_t*)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-typedef SordIter* SLV2Matches;
-typedef SordNode* SLV2Node;
+typedef SordIter* SLV2Matches;
+typedef const SordNode* SLV2Node;
#define FOREACH_MATCH(iter) \
for (; !sord_iter_end(iter); sord_iter_next(iter))
-static inline SLV2Node
+static inline const SordNode*
slv2_match_subject(SLV2Matches iter) {
SordQuad tup;
sord_iter_get(iter, tup);
return tup[SORD_SUBJECT];
}
-static inline SLV2Node
+static inline const SordNode*
slv2_match_object(SLV2Matches iter) {
SordQuad tup;
sord_iter_get(iter, tup);
@@ -101,8 +101,8 @@ void slv2_port_free(SLV2Port port);
/* ********* Spec ********* */
struct _SLV2Spec {
- SLV2Node spec;
- SLV2Node bundle;
+ SordNode* spec;
+ SordNode* bundle;
SLV2Values data_uris;
};
@@ -233,30 +233,30 @@ struct _SLV2World {
SLV2PluginClasses plugin_classes;
GSList* specs;
SLV2Plugins plugins;
- SLV2Node dc_replaces_node;
- SLV2Node dyn_manifest_node;
- SLV2Node lv2_specification_node;
- SLV2Node lv2_plugin_node;
- SLV2Node lv2_binary_node;
- SLV2Node lv2_default_node;
- SLV2Node lv2_minimum_node;
- SLV2Node lv2_maximum_node;
- SLV2Node lv2_port_node;
- SLV2Node lv2_portproperty_node;
- SLV2Node lv2_reportslatency_node;
- SLV2Node lv2_index_node;
- SLV2Node lv2_symbol_node;
- SLV2Node rdf_a_node;
- SLV2Node rdf_value_node;
- SLV2Node rdfs_class_node;
- SLV2Node rdfs_label_node;
- SLV2Node rdfs_seealso_node;
- SLV2Node rdfs_subclassof_node;
- SLV2Node slv2_dmanifest_node;
- SLV2Node xsd_boolean_node;
- SLV2Node xsd_decimal_node;
- SLV2Node xsd_double_node;
- SLV2Node xsd_integer_node;
+ SordNode* dc_replaces_node;
+ SordNode* dyn_manifest_node;
+ SordNode* lv2_specification_node;
+ SordNode* lv2_plugin_node;
+ SordNode* lv2_binary_node;
+ SordNode* lv2_default_node;
+ SordNode* lv2_minimum_node;
+ SordNode* lv2_maximum_node;
+ SordNode* lv2_port_node;
+ SordNode* lv2_portproperty_node;
+ SordNode* lv2_reportslatency_node;
+ SordNode* lv2_index_node;
+ SordNode* lv2_symbol_node;
+ SordNode* rdf_a_node;
+ SordNode* rdf_value_node;
+ SordNode* rdfs_class_node;
+ SordNode* rdfs_label_node;
+ SordNode* rdfs_seealso_node;
+ SordNode* rdfs_subclassof_node;
+ SordNode* slv2_dmanifest_node;
+ SordNode* xsd_boolean_node;
+ SordNode* xsd_decimal_node;
+ SordNode* xsd_double_node;
+ SordNode* xsd_integer_node;
SLV2Value doap_name_val;
SLV2Value lv2_name_val;
SLV2Options opt;
@@ -306,7 +306,7 @@ struct _SLV2Value {
int int_val;
float float_val;
bool bool_val;
- SLV2Node uri_val;
+ SordNode* uri_val;
} val;
SLV2ValueType type;
};
@@ -332,11 +332,11 @@ slv2_array_append(GSequence* seq, void* value) {
struct _SLV2Header*
slv2_sequence_get_by_uri(GSequence* seq, SLV2Value uri);
-static inline SLV2Node slv2_node_copy(SLV2Node node) {
+static inline SordNode* slv2_node_copy(SLV2Node node) {
return sord_node_copy(node);
}
-static inline void slv2_node_free(SLV2World world, SLV2Node node) {
+static inline void slv2_node_free(SLV2World world, SordNode* node) {
sord_node_free(world->world, node);
}
diff --git a/src/value.c b/src/value.c
index 477fc0d..486182e 100644
--- a/src/value.c
+++ b/src/value.c
@@ -92,7 +92,7 @@ slv2_value_new(SLV2World world, SLV2ValueType type, const char* str)
/** Create a new SLV2Value from @a node, or return NULL if impossible */
SLV2Value
-slv2_value_new_from_node(SLV2World world, SordNode* node)
+slv2_value_new_from_node(SLV2World world, const SordNode* node)
{
SLV2Value result = NULL;
SordNode* datatype_uri = NULL;