mirror of
https://github.com/git/git.git
synced 2024-11-01 23:07:55 +01:00
ab73a9d119
Hashmap entries are typically looked up by just a key. The hashmap_get() API expects an initialized entry structure instead, to support compound keys. This flexibility is currently only needed by find_dir_entry() in name-hash.c (and compat/win32/fscache.c in the msysgit fork). All other (currently five) call sites of hashmap_get() have to set up a near emtpy entry structure, resulting in duplicate code like this: struct hashmap_entry keyentry; hashmap_entry_init(&keyentry, hash(key)); return hashmap_get(map, &keyentry, key); Add a hashmap_get_from_hash() API that allows hashmap lookups by just specifying the key and its hash code, i.e.: return hashmap_get_from_hash(map, hash(key), key); Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
api-allocation-growing.txt | ||
api-argv-array.txt | ||
api-builtin.txt | ||
api-config.txt | ||
api-credentials.txt | ||
api-decorate.txt | ||
api-diff.txt | ||
api-directory-listing.txt | ||
api-gitattributes.txt | ||
api-grep.txt | ||
api-hashmap.txt | ||
api-history-graph.txt | ||
api-in-core-index.txt | ||
api-index-skel.txt | ||
api-index.sh | ||
api-lockfile.txt | ||
api-merge.txt | ||
api-object-access.txt | ||
api-parse-options.txt | ||
api-quote.txt | ||
api-ref-iteration.txt | ||
api-remote.txt | ||
api-revision-walking.txt | ||
api-run-command.txt | ||
api-setup.txt | ||
api-sha1-array.txt | ||
api-sigchain.txt | ||
api-strbuf.txt | ||
api-string-list.txt | ||
api-tree-walking.txt | ||
api-xdiff-interface.txt | ||
bitmap-format.txt | ||
http-protocol.txt | ||
index-format.txt | ||
pack-format.txt | ||
pack-heuristics.txt | ||
pack-protocol.txt | ||
protocol-capabilities.txt | ||
protocol-common.txt | ||
racy-git.txt | ||
send-pack-pipeline.txt | ||
shallow.txt | ||
trivial-merge.txt |