diff options
author | Eric Wong <e@80x24.org> | 2019-10-07 01:30:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-07 03:20:12 +0200 |
commit | e2b5038d8793a1d1f92b62dab82acc0d6b7dbcb7 (patch) | |
tree | 976db498f6351b16a1b93574315efdb55d0a810d /hashmap.h | |
parent | hashmap: remove type arg from hashmap_{get,put,remove}_entry (diff) | |
download | git-e2b5038d8793a1d1f92b62dab82acc0d6b7dbcb7.tar.xz git-e2b5038d8793a1d1f92b62dab82acc0d6b7dbcb7.zip |
hashmap_entry: remove first member requirement from docs
Comments stating that "struct hashmap_entry" must be the first
member in a struct are no longer valid.
Suggested-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hashmap.h')
-rw-r--r-- | hashmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -13,7 +13,7 @@ * * struct hashmap map; * struct long2string { - * struct hashmap_entry ent; // must be the first member! + * struct hashmap_entry ent; * long key; * char value[FLEX_ARRAY]; // be careful with allocating on stack! * }; @@ -141,7 +141,7 @@ static inline unsigned int oidhash(const struct object_id *oid) /* * struct hashmap_entry is an opaque structure representing an entry in the - * hash table, which must be used as first member of user data structures. + * hash table. * Ideally it should be followed by an int-sized member to prevent unused * memory on 64-bit systems due to alignment. */ |