new: add support for previous lists for the resolve function

This commit is contained in:
ngn
2024-07-16 20:08:59 +03:00
parent 1e9b494c68
commit d261d99422
3 changed files with 7 additions and 6 deletions

View File

@ -45,14 +45,16 @@ end:
return true;
}
lm_ctx_resolve_list_t *lm_ctx_resolve(lm_ctx_t *ctx, lm_pkg_t *pkg){
lm_ctx_resolve_list_t *lm_ctx_resolve(lm_ctx_t *ctx, lm_pkg_t *pkg, lm_ctx_resolve_list_t *list){
if(NULL == ctx || NULL == pkg){
lm_error_set(LM_ERR_ArgNULL);
return NULL;
}
lm_ctx_resolve_list_t *list = malloc(sizeof(lm_ctx_resolve_list_t));
bzero(list, sizeof(lm_ctx_resolve_list_t));
if(NULL == list){
list = malloc(sizeof(lm_ctx_resolve_list_t));
bzero(list, sizeof(lm_ctx_resolve_list_t));
}
if(!__lm_ctx_resolve(ctx, list, pkg)){
pkglist_free(list->resolving);