From: Johannes Schindelin Date: Wed, 05 Aug 2026 13:51:20 GMT Subject: Re: [PATCH 01/12] diff-delta: widen `struct delta_index`' size fields to `size_t` Message-ID: <2f4a466a-82d0-5a21-d1a6-4482d4d3f841@gmx.de> In-Reply-To: Hi Patrick, On Wed, 5 Aug 2026, Patrick Steinhardt wrote: > On Thu, Jul 09, 2026 at 04:49:28PM +0000, Johannes Schindelin via GitGitGadget wrote: > > diff --git a/diff-delta.c b/diff-delta.c > > index 43c339f010..b6b65d7607 100644 > > --- a/diff-delta.c > > +++ b/diff-delta.c > > @@ -125,9 +125,9 @@ struct unpacked_index_entry { > > }; > > > > struct delta_index { > > - unsigned long memsize; > > + size_t memsize; > > const void *src_buf; > > - unsigned long src_size; > > + size_t src_size; > > unsigned int hash_mask; > > struct index_entry *hash[FLEX_ARRAY]; > > }; > > `sizeof_delta_index` returns `index->memsize`, so we'll also have to > adapt that function's return value and its callers. Good call! Will fix. Ciao, Johannes > > > @@ -140,7 +140,7 @@ struct delta_index * create_delta_index(const void *buf, unsigned long bufsize) > > I was about to complain that the input parameter here uses `unsigned > long`, too. But the next patch addresses that. > > > struct unpacked_index_entry *entry, **hash; > > struct index_entry *packed_entry, **packed_hash; > > void *mem; > > - unsigned long memsize; > > + size_t memsize; > > > > if (!buf || !bufsize) > > return NULL; > > Patrick >