diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Hold object sizes in size_t as git 2.55 does
Git 2.55 moved object sizes from unsigned long to size_t. The two are the same type on 64-bit hosts, but not on a 32-bit one, where GCC 14 rejects the mismatched pointers, so cgit stopped compiling there.
Diffstat (limited to 'source/shared.h')
-rw-r--r--source/shared.h4
1 file changed, 2 insertions, 2 deletions
diff --git a/source/shared.h b/source/shared.h
index df18772..10aa659 100644
--- a/source/shared.h
+++ b/source/shared.h
@@ -62,7 +62,7 @@ extern void cgit_diff_tree_cb(struct diff_queue_struct *q, struct diff_options *
* in place of the content.
*/
extern int cgit_diff_files(const struct object_id *old_oid, const struct object_id *new_oid,
- unsigned long *old_size, unsigned long *new_size, int *binary, int context, int ignorews,
+ size_t *old_size, size_t *new_size, int *binary, int context, int ignorews,
linediff_fn fn);
/*
@@ -70,7 +70,7 @@ extern int cgit_diff_files(const struct object_id *old_oid, const struct object_
* reading the object, so a huge blob stays out of memory rather than being
* noticed once it is already there.
*/
-extern int cgit_blob_too_large(unsigned long size);
+extern int cgit_blob_too_large(size_t size);
/*
* Limit a diff to the paths below prefix, which is taken literally.