}
int pakfire_problem_create(pakfire_problem** problem,
- pakfire_root* root, pakfire_transaction* transaction, Id id) {
+ pakfire_ctx* ctx, pakfire_root* root, pakfire_transaction* transaction, Id id) {
pakfire_problem* p = NULL;
// Allocate some memory
return -errno;
// Store a reference to the context
- p->ctx = pakfire_root_get_ctx(root);
+ p->ctx = pakfire_ctx_ref(ctx);
// Store a reference to the root
p->root = pakfire_root_ref(root);
typedef struct pakfire_problem pakfire_problem;
+#include <pakfire/ctx.h>
#include <pakfire/solution.h>
#include <pakfire/transaction.h>
+int pakfire_problem_create(pakfire_problem** problem,
+ pakfire_ctx* ctx, pakfire_root* root, pakfire_transaction* transaction, Id id);
+
pakfire_problem* pakfire_problem_ref(pakfire_problem* problem);
pakfire_problem* pakfire_problem_unref(pakfire_problem* problem);
pakfire_solution** pakfire_problem_get_solutions(
pakfire_problem* problem);
-int pakfire_problem_create(pakfire_problem** problem, pakfire_root* root,
- pakfire_transaction* transaction, Id id);
-
pakfire_transaction* pakfire_problem_get_transaction(pakfire_problem* problem);
Id pakfire_problem_get_id(pakfire_problem* problem);
break;
// Create a new problem
- r = pakfire_problem_create(&problem, transaction->root, transaction, id);
+ r = pakfire_problem_create(&problem,
+ transaction->ctx, transaction->root, transaction, id);
if (r)
goto ERROR;