Re: [PATCH v3 20/20] hashmap_entry: remove first member requirement from docs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 7, 2019, 01:52 UTC
- Message-ID
- <xmqqeezp490w.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20191006233043.3516-21-e@80x24.org>
Eric Wong <e@80x24.org> writes:
Show 16 quoted lines
> 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> > --- > attr.c | 2 +- > builtin/fetch.c | 2 +- > hashmap.h | 4 ++-- > merge-recursive.h | 4 ++-- > ref-filter.c | 2 +- > refs.c | 2 +- > remote.h | 2 +- > sub-process.h | 2 +- > t/helper/test-hashmap.c | 1 + > 9 files changed, 11 insertions(+), 10 deletions(-)
After this patch, there is one "/* must be the first member! */" comment left in convert.c, which is both misleading and unfortunate; a structure 'subprocess_entry' wants to be the first field of any enclosing structure, where 'subprocess_entry' has a hashmap_entry as its first field.