diff options
author | midipix <writeonce@midipix.org> | 2024-03-22 02:46:35 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-22 03:51:35 +0000 |
commit | e486b0e9cccc9f3ff5e2bfc518d7bb42324ffb2f (patch) | |
tree | eb92252b9ebf7b7256ad1b1b47a2445329b84d2f /src/arbits | |
parent | 73a403268821740b9292030a7a9abaad16577e26 (diff) | |
download | slibtool-e486b0e9cccc9f3ff5e2bfc518d7bb42324ffb2f.tar.bz2 slibtool-e486b0e9cccc9f3ff5e2bfc518d7bb42324ffb2f.tar.xz |
slbt_ar_get_archive_ctx(): internally bind the meta ctx to the archive ctx.
Diffstat (limited to 'src/arbits')
-rw-r--r-- | src/arbits/slbt_archive_ctx.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <slibtool/slibtool.h> #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; |