printers FEATURE submodule print
Also some refactorization included,
which consists mostly of removing
compiled import structure as it is
not needed in a compiled module and
is not even really viable because
of submodules.
diff --git a/src/parser_yin.c b/src/parser_yin.c
index a3d208d..6f75bda 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -3498,6 +3498,7 @@
*yin_ctx = calloc(1, sizeof **yin_ctx);
LY_CHECK_ERR_RET(!(*yin_ctx), LOGMEM(ctx), LY_EMEM);
(*yin_ctx)->format = LYS_IN_YIN;
+ (*yin_ctx)->main_mod = main_ctx->main_mod;
LY_CHECK_RET(lyxml_ctx_new(ctx, in, &(*yin_ctx)->xmlctx));
/* map the typedefs and groupings list from main context to the submodule's context */
@@ -3558,6 +3559,7 @@
*yin_ctx = calloc(1, sizeof **yin_ctx);
LY_CHECK_ERR_RET(!(*yin_ctx), LOGMEM(mod->ctx), LY_EMEM);
(*yin_ctx)->format = LYS_IN_YIN;
+ (*yin_ctx)->main_mod = mod;
LY_CHECK_RET(lyxml_ctx_new(mod->ctx, in, &(*yin_ctx)->xmlctx));
/* check module */