diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-01-14 10:44:47 +0200 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-01-14 10:44:47 +0200 |
commit | 15b547c55b2045e68f9f48f7d929d47b300dc3a9 (patch) | |
tree | 7f54ff0671d56e099a8551ba8325a41c4029db19 /src/apk_hash.h | |
parent | 3309eaa90008dcd4febf907f619a2f4f060d08b6 (diff) | |
download | apk-tools-15b547c55b2045e68f9f48f7d929d47b300dc3a9.tar.gz apk-tools-15b547c55b2045e68f9f48f7d929d47b300dc3a9.tar.bz2 apk-tools-15b547c55b2045e68f9f48f7d929d47b300dc3a9.tar.xz apk-tools-15b547c55b2045e68f9f48f7d929d47b300dc3a9.zip |
db: keep only filename in file entries, hash by both directory and file
Diffstat (limited to 'src/apk_hash.h')
-rw-r--r-- | src/apk_hash.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/apk_hash.h b/src/apk_hash.h index f1a010c..b9c975e 100644 --- a/src/apk_hash.h +++ b/src/apk_hash.h @@ -20,6 +20,7 @@ typedef void *apk_hash_item; typedef unsigned long (*apk_hash_f)(apk_blob_t); typedef int (*apk_hash_compare_f)(apk_blob_t, apk_blob_t); +typedef int (*apk_hash_compare_item_f)(apk_hash_item, apk_blob_t); typedef void (*apk_hash_delete_f)(apk_hash_item); typedef int (*apk_hash_enumerator_f)(apk_hash_item, void *ctx); @@ -27,7 +28,9 @@ struct apk_hash_ops { ptrdiff_t node_offset; apk_blob_t (*get_key)(apk_hash_item item); unsigned long (*hash_key)(apk_blob_t key); - int (*compare)(apk_blob_t key, apk_blob_t itemkey); + unsigned long (*hash_item)(apk_hash_item item); + int (*compare)(apk_blob_t itemkey, apk_blob_t key); + int (*compare_item)(apk_hash_item item, apk_blob_t key); void (*delete_item)(apk_hash_item item); }; |