Skip to content

Commit c107fd2

Browse files
committed
printer context UPDATE clarify addr_ht building
1 parent 508c21c commit c107fd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/printer_context.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,10 +1747,10 @@ ly_ctx_compiled_print_context(const struct ly_ctx *orig_ctx, struct ly_ctx *ctx,
17471747
/* no search paths */
17481748
memset(&ctx->search_paths, 0, sizeof ctx->search_paths);
17491749

1750-
/* modules, referenced, 2 loops because of augments (forward reference), build the ht first */
1750+
/* modules, referenced, 2 loops because of augments (forward reference) */
17511751
ctxp_set(&orig_ctx->modules, &ctx->modules, mem);
17521752
for (i = 0; i < ctx->modules.count; ++i) {
1753-
/* build the address ht */
1753+
/* allocate the shared module and store its new address in HT so it can be referenced */
17541754
ctx->modules.objs[i] = *mem;
17551755
*mem = (char *)*mem + sizeof(struct lys_module);
17561756
ly_ctx_compiled_addr_ht_add(addr_ht, orig_ctx->modules.objs[i], ctx->modules.objs[i]);

0 commit comments

Comments
 (0)