csum-file: define hashwrite's count as a uint32_t

We want to call this code from Rust and ensure that the types are the same for compatibility, which is easiest to do if the type is a fixed size. Since unsigned int is 32 bits on all the platforms we care about, define it as a uint32_t instead. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Feb 7, 2026 at 20:04 UTC 0a0f6b97e9bd41c1ed6b386b99a52e62ea72e4a6
2 files changed +2 -2
csum-file.c
+1 -1
@@ -110,7 +110,7 @@ void discard_hashfile(struct hashfile *f)
110 free_hashfile(f);
111 }
112
113 -void hashwrite(struct hashfile *f, const void *buf, unsigned int count)
113 +void hashwrite(struct hashfile *f, const void *buf, uint32_t count)
114 {
115 while (count) {
116 unsigned left = f->buffer_len - f->offset;
csum-file.h
+1 -1
@@ -63,7 +63,7 @@ void free_hashfile(struct hashfile *f);
63 */
64 int finalize_hashfile(struct hashfile *, unsigned char *, enum fsync_component, unsigned int);
65 void discard_hashfile(struct hashfile *);
66 -void hashwrite(struct hashfile *, const void *, unsigned int);
66 +void hashwrite(struct hashfile *, const void *, uint32_t);
67 void hashflush(struct hashfile *f);
68 void crc32_begin(struct hashfile *);
69 uint32_t crc32_end(struct hashfile *);