diff options
Diffstat (limited to 'csum-file.c')
-rw-r--r-- | csum-file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/csum-file.c b/csum-file.c index 3383515669..5c54b3a0b9 100644 --- a/csum-file.c +++ b/csum-file.c @@ -50,7 +50,7 @@ void hashflush(struct hashfile *f) if (offset) { if (!f->skip_hash) - f->algop->update_fn(&f->ctx, f->buffer, offset); + git_hash_update(&f->ctx, f->buffer, offset); flush(f, f->buffer, offset); f->offset = 0; } @@ -73,7 +73,7 @@ int finalize_hashfile(struct hashfile *f, unsigned char *result, if (f->skip_hash) hashclr(f->buffer, f->algop); else - f->algop->final_fn(f->buffer, &f->ctx); + git_hash_final(f->buffer, &f->ctx); if (result) hashcpy(result, f->buffer, f->algop); @@ -128,7 +128,7 @@ void hashwrite(struct hashfile *f, const void *buf, unsigned int count) * f->offset is necessarily zero. */ if (!f->skip_hash) - f->algop->update_fn(&f->ctx, buf, nr); + git_hash_update(&f->ctx, buf, nr); flush(f, buf, nr); } else { /* @@ -217,7 +217,7 @@ void hashfile_checkpoint(struct hashfile *f, struct hashfile_checkpoint *checkpo { hashflush(f); checkpoint->offset = f->total; - f->algop->clone_fn(&checkpoint->ctx, &f->ctx); + git_hash_clone(&checkpoint->ctx, &f->ctx); } int hashfile_truncate(struct hashfile *f, struct hashfile_checkpoint *checkpoint) @@ -228,7 +228,7 @@ int hashfile_truncate(struct hashfile *f, struct hashfile_checkpoint *checkpoint lseek(f->fd, offset, SEEK_SET) != offset) return -1; f->total = offset; - f->algop->clone_fn(&f->ctx, &checkpoint->ctx); + git_hash_clone(&f->ctx, &checkpoint->ctx); f->offset = 0; /* hashflush() was called in checkpoint */ return 0; } @@ -256,8 +256,8 @@ int hashfile_checksum_valid(const unsigned char *data, size_t total_len) return 0; /* say "too short"? */ algop->init_fn(&ctx); - algop->update_fn(&ctx, data, data_len); - algop->final_fn(got, &ctx); + git_hash_update(&ctx, data, data_len); + git_hash_final(got, &ctx); return hasheq(got, data + data_len, algop); } |