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;
}
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;
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);
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);