struct pakfire_problem* pakfire_problem_ref(struct pakfire_problem* problem);
struct pakfire_problem* pakfire_problem_unref(struct pakfire_problem* problem);
-struct pakfire_problem* pakfire_problem_next(struct pakfire_problem* problem);
-void pakfire_problem_append(struct pakfire_problem* problem, struct pakfire_problem* new_problem);
-
const char* pakfire_problem_to_string(struct pakfire_problem* problem);
struct pakfire_request* pakfire_problem_get_request(struct pakfire_problem* problem);
pakfire_parser_error_unref;
# problem
- pakfire_problem_append;
pakfire_problem_create;
pakfire_problem_get_solutions;
- pakfire_problem_next;
pakfire_problem_ref;
pakfire_problem_to_string;
pakfire_problem_unref;
struct pakfire_problem {
Pakfire pakfire;
+ int nrefs;
+
struct pakfire_request* request;
Id id;
char* string;
-
- struct pakfire_problem* next;
- int nrefs;
};
static char* to_string(struct pakfire_problem* problem) {
}
static void pakfire_problem_free(struct pakfire_problem* problem) {
- pakfire_problem_unref(problem->next);
pakfire_request_unref(problem->request);
if (problem->string)
return pakfire_ref(problem->pakfire);
}
-PAKFIRE_EXPORT struct pakfire_problem* pakfire_problem_next(struct pakfire_problem* problem) {
- return problem->next;
-}
-
-PAKFIRE_EXPORT void pakfire_problem_append(struct pakfire_problem* problem, struct pakfire_problem* new_problem) {
- struct pakfire_problem* next;
-
- // Go to last problem in list
- while ((next = pakfire_problem_next(problem)) != NULL) {
- problem = next;
- }
-
- problem->next = pakfire_problem_ref(new_problem);
-}
-
PAKFIRE_EXPORT const char* pakfire_problem_to_string(struct pakfire_problem* problem) {
return problem->string;
}