path: root/Documentation/technical/api-hash.txt
diff options
authorKarsten Blees <>2013-11-14 19:23:12 (GMT)
committerJunio C Hamano <>2013-11-18 21:04:25 (GMT)
commitefc684245b81ae0fb8f0afbd06dc1c3101c4e5a0 (patch)
treedf9c2df21f55b0b0d89ed7ac37b71c2d0bd4851a /Documentation/technical/api-hash.txt
parent419a597f6408d5b5cffe3e278258f58b47d15ad3 (diff)
remove old hash.[ch] implementation
Signed-off-by: Karsten Blees <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/technical/api-hash.txt')
1 files changed, 0 insertions, 52 deletions
diff --git a/Documentation/technical/api-hash.txt b/Documentation/technical/api-hash.txt
deleted file mode 100644
index e5061e0..0000000
--- a/Documentation/technical/api-hash.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-hash API
-The hash API is a collection of simple hash table functions. Users are expected
-to implement their own hashing.
-Data Structures
-`struct hash_table`::
- The hash table structure. The `array` member points to the hash table
- entries. The `size` member counts the total number of valid and invalid
- entries in the table. The `nr` member keeps track of the number of
- valid entries.
-`struct hash_table_entry`::
- An opaque structure representing an entry in the hash table. The `hash`
- member is the entry's hash key and the `ptr` member is the entry's
- value.
- Initialize the hash table.
- Release memory associated with the hash table.
- Insert a pointer into the hash table. If an entry with that hash
- already exists, a pointer to the existing entry's value is returned.
- Otherwise NULL is returned. This allows callers to implement
- chaining, etc.
- Lookup an entry in the hash table. If an entry with that hash exists
- the entry's value is returned. Otherwise NULL is returned.
- Call a function for each entry in the hash table. The function is
- expected to take the entry's value as its only argument and return an
- int. If the function returns a negative int the loop is aborted
- immediately. Otherwise, the return value is accumulated and the sum
- returned upon completion of the loop.