xpath CHANGE changes related to devel merge
diff --git a/src/tree_data.c b/src/tree_data.c
index c2488ae..83d14b9 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -235,6 +235,24 @@
free(attr);
}
+struct lyd_node *
+lyd_attr_parent(struct lyd_node *root, struct lyd_attr *attr)
+{
+ struct lyd_node *next, *elem;
+ struct lyd_attr *node_attr;
+
+ LY_TREE_DFS_BEGIN(root, next, elem) {
+ for (node_attr = elem->attr; node_attr; node_attr = node_attr->next) {
+ if (node_attr == attr) {
+ return elem;
+ }
+ }
+ LY_TREE_DFS_END(root, next, elem)
+ }
+
+ return NULL;
+}
+
API void
lyd_free(struct lyd_node *node)
{