update: redesigning ctx functions and structure

This commit is contained in:
ngn
2024-07-05 01:44:42 +03:00
parent 38b99eda79
commit 6045f73478
20 changed files with 663 additions and 343 deletions

View File

@ -47,6 +47,13 @@ bool lm_package_remove_download(lm_pkg_t *pkg){
return true;
}
bool lm_package_is_same(lm_pkg_t *one, lm_pkg_t *two){
return eq(one->version, two->version) &&
eq(one->name, two->name) &&
eq(one->desc, two->desc) &&
one->size == two->size;
}
void lm_package_free(lm_pkg_t *pkg){
lm_package_data_free(pkg);
bzero(pkg, sizeof(lm_pkg_t));