diff options
author | midipix <writeonce@midipix.org> | 2024-02-21 04:25:30 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-21 04:25:30 +0000 |
commit | 53c651164d18578c1b50f5b09e923ae1fd5e10c5 (patch) | |
tree | 0da40afa076f6b858c7b9b15aee7106220d72bc3 | |
parent | af35a17870c2fcb8689b6b67089b41697a5d30c1 (diff) | |
download | slibtool-53c651164d18578c1b50f5b09e923ae1fd5e10c5.tar.bz2 slibtool-53c651164d18578c1b50f5b09e923ae1fd5e10c5.tar.xz |
driver: internals: move the argv meta data to struct slbt_driver_ctx_impl.
-rw-r--r-- | src/driver/slbt_driver_ctx.c | 9 | ||||
-rw-r--r-- | src/internal/slibtool_driver_impl.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c index 308b4fd..a94b352 100644 --- a/src/driver/slbt_driver_ctx.c +++ b/src/driver/slbt_driver_ctx.c @@ -228,7 +228,6 @@ slbt_hidden int slbt_driver_usage( } static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc( - struct argv_meta * meta, const struct slbt_fd_ctx * fdctx, const struct slbt_common_ctx * cctx, struct slbt_split_vector * sargv, @@ -262,8 +261,7 @@ static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc( ictx->ctx.objlistv = objlistv; - ictx->meta = meta; - ictx->ctx.ctx.errv = ictx->ctx.errinfp; + ictx->ctx.ctx.errv = ictx->ctx.errinfp; return &ictx->ctx; } @@ -865,7 +863,7 @@ int slbt_lib_get_driver_ctx( cctx.tag = SLBT_TAG_CC; /* driver context */ - if (!(ctx = slbt_driver_ctx_alloc(meta,fdctx,&cctx,&sargv,objlistv,envp))) + if (!(ctx = slbt_driver_ctx_alloc(fdctx,&cctx,&sargv,objlistv,envp))) return slbt_lib_get_driver_ctx_fail(0,meta); /* ctx */ @@ -874,6 +872,7 @@ int slbt_lib_get_driver_ctx( ctx->cctx.targv = sargv.targv; ctx->cctx.cargv = sargv.cargv; + ctx->meta = meta; /* heuristics */ if (cctx.drvflags & SLBT_DRIVER_HEURISTICS) { @@ -1015,7 +1014,7 @@ static void slbt_lib_free_driver_ctx_impl(struct slbt_driver_ctx_alloc * ictx) slbt_free_host_params(&ictx->ctx.host); slbt_free_host_params(&ictx->ctx.ahost); - argv_free(ictx->meta); + argv_free(ictx->ctx.meta); free(ictx); } diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h index c325134..5a00a3c 100644 --- a/src/internal/slibtool_driver_impl.h +++ b/src/internal/slibtool_driver_impl.h @@ -135,6 +135,7 @@ struct slbt_obj_list { }; struct slbt_driver_ctx_impl { + struct argv_meta * meta; struct slbt_common_ctx cctx; struct slbt_driver_ctx ctx; struct slbt_host_strs host; @@ -160,7 +161,6 @@ struct slbt_driver_ctx_impl { }; struct slbt_driver_ctx_alloc { - struct argv_meta * meta; struct slbt_driver_ctx_impl ctx; uint64_t guard; }; |