Re: [PATCH v3 01/15] commit-slab.h: code split
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 21, 2018, 05:11 UTC
- Message-ID
- <xmqqr2m51tlg.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180519052831.12603-2-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> The struct declaration and implementation macros are moved to > commit-slab-hdr.h and commit-slab-impl.h respectively.
s/hdr/decl/;
Show 5 quoted lines
> > This right now is not needed for current users but if we make a public > commit-slab type, we may want to avoid including the slab > implementation in a header file which gets replicated in every c file > that includes it.
s/c file/C file/;
Also s/may want to/need to/; after all this is not about avoid bloating the header and slowing down compilation. Rather, the duplicated implementation will cause linkage failures so we want only a single implementation that is referenced from many places.
> ---
Missing sign off.
Show 6 quoted lines
> commit-slab-decl.h | 30 ++++++++++++ > commit-slab-impl.h | 91 +++++++++++++++++++++++++++++++++++ > commit-slab.h | 115 +++------------------------------------------ > 3 files changed, 127 insertions(+), 109 deletions(-) > create mode 100644 commit-slab-decl.h > create mode 100644 commit-slab-impl.h
Other than that, looking good.