mirror of
https://github.com/git-for-windows/git.git
synced 2026-06-17 07:21:10 -05:00
object-file.c: use size_t for header lengths
Continue walking the code path for the >4GB `hash-object --literally` test. The `hash_object_file_literally()` function internally uses both `hash_object_file()` and `write_object_file_prepare()`. Both function signatures use `unsigned long` rather than `size_t` for the mem buffer sizes. Use `size_t` instead, for LLP64 compatibility. While at it, convert those function's object's header buffer length to `size_t` for consistency. The value is already upcast to `uintmax_t` for print format compatibility. Note: The hash-object test still does not pass. A subsequent commit continues to walk the call tree's lower level hash functions to identify further fixes. Signed-off-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
2894e56c5a
commit
bcb5666bef
@@ -66,7 +66,7 @@ int odb_source_loose_freshen_object(struct odb_source *source,
|
||||
const struct object_id *oid);
|
||||
|
||||
int odb_source_loose_write_object(struct odb_source *source,
|
||||
const void *buf, unsigned long len,
|
||||
const void *buf, size_t len,
|
||||
enum object_type type, struct object_id *oid,
|
||||
struct object_id *compat_oid_in,
|
||||
enum odb_write_object_flags flags);
|
||||
@@ -201,7 +201,7 @@ int finalize_object_file_flags(struct repository *repo,
|
||||
enum finalize_object_file_flags flags);
|
||||
|
||||
void hash_object_file(const struct git_hash_algo *algo, const void *buf,
|
||||
unsigned long len, enum object_type type,
|
||||
size_t len, enum object_type type,
|
||||
struct object_id *oid);
|
||||
|
||||
/* Helper to check and "touch" a file */
|
||||
|
||||
Reference in New Issue
Block a user