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/printer_lyb.c b/src/printer_lyb.c
index bb5cc9e..1282ff0 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -611,13 +611,13 @@
lyb_print_opaq(struct lyd_node_opaq *opaq, struct ly_out *out, struct lylyb_ctx *lybctx)
{
/* prefix */
- LY_CHECK_RET(lyb_write_string(opaq->prefix.id, 0, 1, out, lybctx));
+ LY_CHECK_RET(lyb_write_string(opaq->name.prefix, 0, 1, out, lybctx));
/* module reference */
- LY_CHECK_RET(lyb_write_string(opaq->prefix.module_name, 0, 1, out, lybctx));
+ LY_CHECK_RET(lyb_write_string(opaq->name.module_name, 0, 1, out, lybctx));
/* name */
- LY_CHECK_RET(lyb_write_string(opaq->name, 0, 1, out, lybctx));
+ LY_CHECK_RET(lyb_write_string(opaq->name.name, 0, 1, out, lybctx));
/* format */
LY_CHECK_RET(lyb_write_number(opaq->format, 1, out, lybctx));
@@ -799,13 +799,13 @@
LY_CHECK_RET(lyb_write_start_subtree(out, lybctx));
/* prefix */
- LY_CHECK_RET(lyb_write_string(iter->prefix.id, 0, 1, out, lybctx));
+ LY_CHECK_RET(lyb_write_string(iter->name.prefix, 0, 1, out, lybctx));
/* namespace */
- LY_CHECK_RET(lyb_write_string(iter->prefix.module_name, 0, 1, out, lybctx));
+ LY_CHECK_RET(lyb_write_string(iter->name.module_name, 0, 1, out, lybctx));
/* name */
- LY_CHECK_RET(lyb_write_string(iter->name, 0, 1, out, lybctx));
+ LY_CHECK_RET(lyb_write_string(iter->name.name, 0, 1, out, lybctx));
/* format */
LY_CHECK_RET(lyb_write_number(iter->format, 1, out, lybctx));