lyb FEATURE print/parse node flags
To allow completely transparent printing
and loading data.
diff --git a/src/parser_lyb.c b/src/parser_lyb.c
index 1076bdc..74519a7 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -685,7 +685,7 @@
char *value = NULL, *name = NULL, *prefix = NULL, *module_key = NULL;
ly_bool dynamic = 0;
LYD_FORMAT format = 0;
- uint32_t prev_lo;
+ uint32_t prev_lo, flags;
const struct ly_ctx *ctx = lybctx->lybctx->ctx;
/* register a new subtree */
@@ -720,6 +720,9 @@
LY_CHECK_GOTO(ret, cleanup);
}
+ /* read flags */
+ lyb_read_number(&flags, sizeof flags, sizeof flags, lybctx->lybctx);
+
if (!snode) {
/* parse prefix */
ret = lyb_read_string(&prefix, 1, lybctx->lybctx);
@@ -836,10 +839,8 @@
}
assert(node);
- /* add/correct flags */
- if (snode) {
- lyd_parse_set_data_flags(node, &lybctx->when_check, &meta, lybctx->parse_options);
- }
+ /* set flags */
+ node->flags = flags;
/* add metadata/attributes */
if (snode) {