Skip to content

Commit baca8bc

Browse files
dschoGit for Windows Build Agent
authored andcommitted
diff-delta: widen sizeof_delta_index() return to size_t
Last piece of the delta API to still expose unsigned long. The function literally returns struct delta_index.memsize, which became size_t in the first commit of this series. The sole caller (free_unpacked() in builtin/pack-objects.c) already accepts size_t via its freed_mem local, so the widening only removes the implicit size_t -> unsigned long narrowing inside the function body. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent b4c1920 commit baca8bc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/delta.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void free_delta_index(struct delta_index *index);
2828
*
2929
* Given pointer must be what create_delta_index() returned, or NULL.
3030
*/
31-
unsigned long sizeof_delta_index(struct delta_index *index);
31+
size_t sizeof_delta_index(struct delta_index *index);
3232

3333
/*
3434
* create_delta: create a delta from given index for the given buffer

lib/diff-delta.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ void free_delta_index(struct delta_index *index)
302302
free(index);
303303
}
304304

305-
unsigned long sizeof_delta_index(struct delta_index *index)
305+
size_t sizeof_delta_index(struct delta_index *index)
306306
{
307307
if (index)
308308
return index->memsize;

0 commit comments

Comments
 (0)