Re: [PATCH v4 3/9] checkout.[ch]: move struct declaration into *.h
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 1, 2018, 02:14 UTC
- Message-ID
- <xmqqpo1b9rs8.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180531214546.GC26159@hank.intra.tgummerer.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 9 quoted lines
> We seem to have plenty of structs defined in '.c' files, if they are > only needed there. Its use also seems to be single purpose for the > callback data, so I'm a bit puzzled how having this in a header file > instead of the .c file would be helpful? > > I feel like having only the "public" part in the header file also > helps developers that are just looking for documentation of the > functions they are looking at, by having less things to go through, > that they wouldn't necessarily care about.
Yup, sounds like a sensible criterion to choose between <*.h> and <*.c>.