data tree FEATURE schema-ordering of data
All (leaf-)list instances preserve their input
order, new instances inserted at the end.
Opaque nodes are at the end, after all the
standard nodes.
Also, now first instances of (leaf-)lists
are inserted into hash table twice, second
time without their keys/value in the hash.
diff --git a/src/context.c b/src/context.c
index b2637ff..486110c 100644
--- a/src/context.c
+++ b/src/context.c
@@ -756,11 +756,10 @@
}
if (root_bis) {
- if (lyd_insert_sibling(root_bis, root)) {
+ if (lyd_insert_sibling(root, root_bis, &root)) {
goto error;
}
- root = root_bis;
- root_bis = 0;
+ root_bis = NULL;
}
LY_CHECK_GOTO(ret = lyd_validate_all(&root, NULL, LYD_VALIDATE_PRESENT, NULL), error);