Re: [PATCH 01/10] ivec: introduce the C side of ivec
On Sat, Jan 3, 2026 at 10:32 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 27 quoted lines
>
> "Ezekiel Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > + if (new_capacity == 0) {
> > + free(self->ptr);
> > + self->ptr = NULL;
>
> if (!new_capacity)
> FREE_AND_NULL(self->ptr);
> else
> ...;
>
> > +void ivec_free(void *self_)
> > +{
> > + struct IVec_c_void *self = self_;
> > +
> > + free(self->ptr);
> > + self->ptr = NULL;
>
> Likewise. Otherwise the code will fail coccicheck.
>
> > + self->length = 0;
> > + self->capacity = 0;
> > + // DO NOT MODIFY element_size!!!
>
> /* A single-liner comment in our codebase looks like this */
>I will make these changes.