summaryrefslogtreecommitdiffstats
path: root/src/sratom.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-24 00:57:48 +0000
committerDavid Robillard <d@drobilla.net>2014-01-24 00:57:48 +0000
commitbb3fcd6b15e742ba278fe5ac5cd975e67c715042 (patch)
tree08d8aeebf618aace7d46d34995f2b4819388a3fb /src/sratom.c
parent87021f5f90ba1df233df19f2d1cb6ff2bbbec888 (diff)
downloadsratom-bb3fcd6b15e742ba278fe5ac5cd975e67c715042.tar.gz
sratom-bb3fcd6b15e742ba278fe5ac5cd975e67c715042.tar.bz2
sratom-bb3fcd6b15e742ba278fe5ac5cd975e67c715042.zip
Update for latest LV2 Atom Object simplifications.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@5319 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/sratom.c')
-rw-r--r--src/sratom.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sratom.c b/src/sratom.c
index 584be8c..ef0a450 100644
--- a/src/sratom.c
+++ b/src/sratom.c
@@ -370,12 +370,12 @@ sratom_write(Sratom* sratom,
if (sratom->end_anon) {
sratom->end_anon(sratom->handle, &id);
}
- } else if (type_urid == sratom->forge.Blank ||
- type_urid == sratom->forge.Resource) {
+ } else if (lv2_atom_forge_is_object_type(&sratom->forge, type_urid)) {
const LV2_Atom_Object_Body* obj = (const LV2_Atom_Object_Body*)body;
const char* otype = unmap->unmap(unmap->handle,
obj->otype);
- if (type_urid == sratom->forge.Blank) {
+
+ if (lv2_atom_forge_is_blank(&sratom->forge, type_urid, obj)) {
gensym(&id, 'b', sratom->next_id++);
start_object(sratom, &flags, subject, predicate, &id, otype);
} else {
@@ -533,7 +533,7 @@ read_resource(Sratom* sratom,
if (!(sord_node_equals(p, sratom->nodes.rdf_type) &&
sord_node_get_type(o) == SORD_URI &&
map->map(map->handle, (const char*)sord_node_get_string(o)) == otype)) {
- lv2_atom_forge_property_head(forge, p_urid, 0);
+ lv2_atom_forge_key(forge, p_urid);
read_node(sratom, forge, world, model, o, MODE_BODY);
}
}
@@ -687,11 +687,11 @@ read_node(Sratom* sratom,
lv2_atom_forge_write(forge, body, size);
free(body);
} else if (sord_node_get_type(node) == SORD_URI) {
- lv2_atom_forge_resource(
+ lv2_atom_forge_object(
forge, &frame, map->map(map->handle, str), type_urid);
read_resource(sratom, forge, world, model, node, type_urid);
} else {
- lv2_atom_forge_blank(forge, &frame, sratom->next_id++, type_urid);
+ lv2_atom_forge_object(forge, &frame, 0, type_urid);
read_resource(sratom, forge, world, model, node, type_urid);
}
if (frame.ref) {