mirror of
https://github.com/git/git.git
synced 2026-06-30 19:58:12 +00:00
hash: stop typedeffing the hash context
We generally avoid using `typedef` in the Git codebase. One exception though is the `git_hash_ctx`, likely because it used to be a union rather than a struct until the preceding commit refactored it. But now that it is a normal `struct` there isn't really a need for a typedef anymore. Drop the typedef and adapt all callers accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
52eef501e1
commit
7346e340f1
11
hash.h
11
hash.h
@@ -241,13 +241,12 @@ struct git_hash_ctx {
|
||||
git_SHA256_CTX sha256;
|
||||
} state;
|
||||
};
|
||||
typedef struct git_hash_ctx git_hash_ctx;
|
||||
|
||||
typedef void (*git_hash_init_fn)(git_hash_ctx *ctx);
|
||||
typedef void (*git_hash_clone_fn)(git_hash_ctx *dst, const git_hash_ctx *src);
|
||||
typedef void (*git_hash_update_fn)(git_hash_ctx *ctx, const void *in, size_t len);
|
||||
typedef void (*git_hash_final_fn)(unsigned char *hash, git_hash_ctx *ctx);
|
||||
typedef void (*git_hash_final_oid_fn)(struct object_id *oid, git_hash_ctx *ctx);
|
||||
typedef void (*git_hash_init_fn)(struct git_hash_ctx *ctx);
|
||||
typedef void (*git_hash_clone_fn)(struct git_hash_ctx *dst, const struct git_hash_ctx *src);
|
||||
typedef void (*git_hash_update_fn)(struct git_hash_ctx *ctx, const void *in, size_t len);
|
||||
typedef void (*git_hash_final_fn)(unsigned char *hash, struct git_hash_ctx *ctx);
|
||||
typedef void (*git_hash_final_oid_fn)(struct object_id *oid, struct git_hash_ctx *ctx);
|
||||
|
||||
struct git_hash_algo {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user