From e486b0e9cccc9f3ff5e2bfc518d7bb42324ffb2f Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 22 Mar 2024 02:46:35 +0000 Subject: slbt_ar_get_archive_ctx(): internally bind the meta ctx to the archive ctx. --- src/arbits/slbt_archive_ctx.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/arbits') diff --git a/src/arbits/slbt_archive_ctx.c b/src/arbits/slbt_archive_ctx.c index 5754773..575374c 100644 --- a/src/arbits/slbt_archive_ctx.c +++ b/src/arbits/slbt_archive_ctx.c @@ -13,6 +13,7 @@ #include #include "slibtool_driver_impl.h" #include "slibtool_errinfo_impl.h" +#include "slibtool_ar_impl.h" static int slbt_map_raw_archive( const struct slbt_driver_ctx * dctx, @@ -65,6 +66,7 @@ int slbt_ar_get_archive_ctx( struct slbt_archive_ctx ** pctx) { struct slbt_archive_ctx_impl * ctx; + struct slbt_archive_meta_impl * mctx; int prot; if (!(ctx = calloc(1,sizeof(*ctx)))) @@ -89,11 +91,14 @@ int slbt_ar_get_archive_ctx( return slbt_ar_free_archive_ctx_impl(ctx, SLBT_NESTED_ERROR(dctx)); + mctx = slbt_archive_meta_ictx(ctx->meta); + ctx->dctx = dctx; ctx->path = ctx->pathbuf; ctx->actx.path = &ctx->path; ctx->actx.map = &ctx->map; ctx->actx.meta = ctx->meta; + mctx->actx = &ctx->actx; *pctx = &ctx->actx; return 0; -- cgit v1.2.3