]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Add function to access context
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 15 Oct 2023 15:12:21 +0000 (15:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 15 Oct 2023 15:12:21 +0000 (15:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/include/pakfire/pakfire.h
src/libpakfire/pakfire.c

index 14a186fcf2707cacaa010809583a1cea90162f89..71dca90a90476b6324e57f5c53420a01fc211032 100644 (file)
@@ -123,6 +123,8 @@ int pakfire_check(struct pakfire* pakfire, struct pakfire_filelist* errors);
 #include <pakfire/config.h>
 #include <pakfire/pwd.h>
 
+struct pakfire_ctx* pakfire_ctx(struct pakfire* pakfire);
+
 const char* pakfire_get_effective_arch(struct pakfire* pakfire);
 
 int pakfire_on_root(struct pakfire* pakfire);
index 027674aed73c2478d6a598b36e91372782acc1f4..4223cece3b97e3721f0b3682f8a39f4f54084355 100644 (file)
@@ -1092,6 +1092,10 @@ PAKFIRE_EXPORT struct pakfire* pakfire_unref(struct pakfire* pakfire) {
        return NULL;
 }
 
+struct pakfire_ctx* pakfire_ctx(struct pakfire* pakfire) {
+       return pakfire_ctx_ref(pakfire->ctx);
+}
+
 // Callbacks
 
 PAKFIRE_EXPORT void pakfire_set_pick_solution_callback(struct pakfire* pakfire,