summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-27 20:18:57 +0000
committermidipix <writeonce@midipix.org>2024-01-27 20:18:57 +0000
commit5d46be2ef1d419ac006be29bd894a30e2cf94ad9 (patch)
treeedf3b8aaec5e495b50bc26c0176f52175ec82a56 /src/internal
parent47341a61ee94ca64c96b781f8c987233a682d739 (diff)
downloadslibtool-5d46be2ef1d419ac006be29bd894a30e2cf94ad9.tar.bz2
slibtool-5d46be2ef1d419ac006be29bd894a30e2cf94ad9.tar.xz
archiver output api: added slbt_ar_output_arname().
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/slibtool_driver_impl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index b1a07f7..2008324 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -157,6 +157,18 @@ struct slbt_archive_ctx_impl {
struct slbt_archive_ctx actx;
};
+static inline struct slbt_archive_ctx_impl * slbt_get_archive_ictx(const struct slbt_archive_ctx * actx)
+{
+ uintptr_t addr;
+
+ if (actx) {
+ addr = (uintptr_t)actx - offsetof(struct slbt_archive_ctx_impl,actx);
+ return (struct slbt_archive_ctx_impl *)addr;
+ }
+
+ return 0;
+}
+
static inline struct slbt_driver_ctx_impl * slbt_get_driver_ictx(const struct slbt_driver_ctx * dctx)
{
uintptr_t addr;