Skip to content

Commit 83dd72d

Browse files
dschoGit for Windows Build Agent
authored andcommitted
diff-delta: widen struct delta_index size fields to size_t
Preparation for widening the delta-encoding API to size_t in subsequent commits, which is what lets pack-objects drop the cast_size_t_to_ulong() shims that 606c192 (odb, packfile: use size_t for streaming object sizes, 2026-05-08) had to leave behind in get_delta() and try_delta() because their downstream consumers were still narrow. The struct is private to diff-delta.c, so widening its fields in isolation is a no-op at runtime: the values stored continue to fit in 32 bits on Windows because the public API around it still truncates. Splitting it out keeps the API-change commit focused on caller updates. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 78fb7ca commit 83dd72d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

diff-delta.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ struct unpacked_index_entry {
125125
};
126126

127127
struct delta_index {
128-
unsigned long memsize;
128+
size_t memsize;
129129
const void *src_buf;
130-
unsigned long src_size;
130+
size_t src_size;
131131
unsigned int hash_mask;
132132
struct index_entry *hash[FLEX_ARRAY];
133133
};
@@ -140,7 +140,7 @@ struct delta_index * create_delta_index(const void *buf, unsigned long bufsize)
140140
struct unpacked_index_entry *entry, **hash;
141141
struct index_entry *packed_entry, **packed_hash;
142142
void *mem;
143-
unsigned long memsize;
143+
size_t memsize;
144144

145145
if (!buf || !bufsize)
146146
return NULL;

0 commit comments

Comments
 (0)