diff options
author | Michael Schroeder <mls@suse.de> | 2012-03-28 16:16:11 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-03-28 16:16:11 +0200 |
commit | c36ef29531924b0a2ec37cdac57211dac32837b1 (patch) | |
tree | 1695a370783842ddd32e08aa7e9b4a88086bcfea /src/solvable.c | |
parent | 7c177fd42e93f6290d910d0694b8179c45eb2fb0 (diff) | |
download | libsolv-c36ef29531924b0a2ec37cdac57211dac32837b1.tar.gz libsolv-c36ef29531924b0a2ec37cdac57211dac32837b1.tar.bz2 libsolv-c36ef29531924b0a2ec37cdac57211dac32837b1.zip |
- incompatible ABI change: switch num over to unsigned long long and store sizes in bytes, not kbytes
Diffstat (limited to 'src/solvable.c')
-rw-r--r-- | src/solvable.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/solvable.c b/src/solvable.c index 77a694e..4e46eaf 100644 --- a/src/solvable.c +++ b/src/solvable.c @@ -200,14 +200,24 @@ solvable_lookup_str_lang(Solvable *s, Id keyname, const char *lang, int usebase) return solvable_lookup_str(s, keyname); } -unsigned int -solvable_lookup_num(Solvable *s, Id keyname, unsigned int notfound) +unsigned long long +solvable_lookup_num(Solvable *s, Id keyname, unsigned long long notfound) { if (!s->repo) return notfound; return repo_lookup_num(s->repo, s - s->repo->pool->solvables, keyname, notfound); } +unsigned int +solvable_lookup_sizek(Solvable *s, Id keyname, unsigned int notfound) +{ + unsigned long long size; + if (!s->repo) + return notfound; + size = solvable_lookup_num(s, keyname, (unsigned long long)notfound << 10); + return (unsigned int)((size + 1023) >> 10); +} + int solvable_lookup_void(Solvable *s, Id keyname) { @@ -633,11 +643,11 @@ solvable_selfprovidedep(Solvable *s) void solvable_set_id(Solvable *s, Id keyname, Id id) { - repo_set_num(s->repo, s - s->repo->pool->solvables, keyname, id); + repo_set_id(s->repo, s - s->repo->pool->solvables, keyname, id); } void -solvable_set_num(Solvable *s, Id keyname, unsigned int num) +solvable_set_num(Solvable *s, Id keyname, unsigned long long num) { repo_set_num(s->repo, s - s->repo->pool->solvables, keyname, num); } |