From: Michael Tremer Date: Sun, 29 Jun 2025 13:37:43 +0000 (+0000) Subject: linter: Directly pass the context X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=620c6f9f5ce688b6d228d1e6812f804901f73d6c;p=people%2Fms%2Fpakfire.git linter: Directly pass the context Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/archive.c b/src/pakfire/archive.c index 33609410..8ba1014b 100644 --- a/src/pakfire/archive.c +++ b/src/pakfire/archive.c @@ -1987,7 +1987,7 @@ int pakfire_archive_lint(pakfire_archive* archive, int r; // Create a new linter - r = pakfire_linter_create(&linter, archive->root, archive); + r = pakfire_linter_create(&linter, archive->ctx, archive->root, archive); if (r < 0) goto ERROR; diff --git a/src/pakfire/linter.c b/src/pakfire/linter.c index fbd660d0..f16284e5 100644 --- a/src/pakfire/linter.c +++ b/src/pakfire/linter.c @@ -169,7 +169,7 @@ ERROR: } int pakfire_linter_create(pakfire_linter** linter, - pakfire_root* root, pakfire_archive* archive) { + pakfire_ctx* ctx, pakfire_root* root, pakfire_archive* archive) { pakfire_linter* l = NULL; int r; @@ -179,7 +179,7 @@ int pakfire_linter_create(pakfire_linter** linter, return -errno; // Reference the context - l->ctx = pakfire_root_get_ctx(root); + l->ctx = pakfire_ctx_ref(ctx); // Reference the root l->root = pakfire_root_ref(root); diff --git a/src/pakfire/linter.h b/src/pakfire/linter.h index 50edd07b..aa6b7ebc 100644 --- a/src/pakfire/linter.h +++ b/src/pakfire/linter.h @@ -39,7 +39,7 @@ typedef int (*pakfire_linter_result_callback)(pakfire_ctx* ctx, typedef struct pakfire_linter pakfire_linter; int pakfire_linter_create(pakfire_linter** linter, - pakfire_root* root, pakfire_archive* archive); + pakfire_ctx* ctx, pakfire_root* root, pakfire_archive* archive); pakfire_linter* pakfire_linter_ref(pakfire_linter* linter); pakfire_linter* pakfire_linter_unref(pakfire_linter* linter);