From 68a0951a9f2fb1bc7dd2e63cfba33aa3af575092 Mon Sep 17 00:00:00 2001 From: ngn Date: Tue, 16 Jul 2024 20:10:10 +0300 Subject: [PATCH] fix: update install example to work with the new resolve function --- examples/client/install.c | 2 +- include/ctx.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/client/install.c b/examples/client/install.c index 85f6cc5..2af92bc 100644 --- a/examples/client/install.c +++ b/examples/client/install.c @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) { printf("resolving package: %s (%s)...\n", pkg->name, pkg->version); - if ((list = lm_ctx_resolve(&ctx, pkg)) == NULL) { + if ((list = lm_ctx_resolve(&ctx, pkg, NULL)) == NULL) { printf("failed to resolve package: %s (%d)\n", lm_strerror(), lm_error()); goto end; } diff --git a/include/ctx.h b/include/ctx.h index b5e39de..67774ad 100644 --- a/include/ctx.h +++ b/include/ctx.h @@ -68,9 +68,10 @@ void lm_ctx_free(lm_ctx_t *ctx); /* #################### ## main fucntions ## #################### */ -lm_ctx_resolve_list_t *lm_ctx_resolve(lm_ctx_t *ctx, lm_pkg_t *pkg, lm_ctx_resolve_list_t *list); // resolves a package and returns a list of packages -lm_pkg_t *lm_ctx_resolve_next(lm_ctx_resolve_list_t *list); // returns the next package in the list -void lm_ctx_resolve_free(lm_ctx_resolve_list_t *list); // frees the resolved list returned by lm_ctx_resolve +lm_ctx_resolve_list_t *lm_ctx_resolve( + lm_ctx_t *ctx, lm_pkg_t *pkg, lm_ctx_resolve_list_t *list); // resolves a package and returns a list of packages +lm_pkg_t *lm_ctx_resolve_next(lm_ctx_resolve_list_t *list); // returns the next package in the list +void lm_ctx_resolve_free(lm_ctx_resolve_list_t *list); // frees the resolved list returned by lm_ctx_resolve lm_ctx_update_list_t *lm_ctx_update_list(lm_ctx_t *ctx); // get a list of packages to update lm_pkg_t *lm_ctx_update_list_next(lm_ctx_update_list_t *list); // get the next package in the update list