data tree REFACTOR opaq name and its module information structure
Put the node name and its module into a separate
structure to follow lyd_node's schema and the
information it stores.
diff --git a/src/tree_data_free.c b/src/tree_data_free.c
index 828a152..274897a 100644
--- a/src/tree_data_free.c
+++ b/src/tree_data_free.c
@@ -116,10 +116,10 @@
iter = iter->next;
ly_free_prefix_data(attr->format, attr->val_prefix_data);
- FREE_STRING(ctx, attr->name);
+ FREE_STRING(ctx, attr->name.name);
+ FREE_STRING(ctx, attr->name.prefix);
+ FREE_STRING(ctx, attr->name.module_ns);
FREE_STRING(ctx, attr->value);
- FREE_STRING(ctx, attr->prefix.id);
- FREE_STRING(ctx, attr->prefix.module_ns);
free(attr);
}
}
@@ -157,9 +157,9 @@
lyd_free_subtree(iter, 0);
}
- FREE_STRING(LYD_CTX(opaq), opaq->name);
- FREE_STRING(LYD_CTX(opaq), opaq->prefix.id);
- FREE_STRING(LYD_CTX(opaq), opaq->prefix.module_ns);
+ FREE_STRING(LYD_CTX(opaq), opaq->name.name);
+ FREE_STRING(LYD_CTX(opaq), opaq->name.prefix);
+ FREE_STRING(LYD_CTX(opaq), opaq->name.module_ns);
FREE_STRING(LYD_CTX(opaq), opaq->value);
ly_free_prefix_data(opaq->format, opaq->val_prefix_data);
} else if (node->schema->nodetype & LYD_NODE_INNER) {