diff options
| author | Vicent Martà <vicent@github.com> | 2013-02-25 15:41:56 -0800 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-02-25 15:41:56 -0800 |
| commit | f657688bc7616b189ea455ade4c8a4909e2786d8 (patch) | |
| tree | e2bcf961faea653ec6015cdf5fdd93876ffd6fe0 /src/hash | |
| parent | be225be7852fc8e4a385b622d24ea35fff761421 (diff) | |
| parent | efe7fad6c96a3d6197a218aeaa561ec676794499 (diff) | |
| download | libgit2-f657688bc7616b189ea455ade4c8a4909e2786d8.tar.gz | |
Merge pull request #1363 from schu/hash-initialization
hash: remove git_hash_init from internal api
Diffstat (limited to 'src/hash')
| -rw-r--r-- | src/hash/hash_generic.c | 4 | ||||
| -rw-r--r-- | src/hash/hash_generic.h | 1 | ||||
| -rw-r--r-- | src/hash/hash_win32.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/hash/hash_generic.c b/src/hash/hash_generic.c index 0723bfaf9..e496d1f5e 100644 --- a/src/hash/hash_generic.c +++ b/src/hash/hash_generic.c @@ -221,7 +221,7 @@ static void hash__block(git_hash_ctx *ctx, const unsigned int *data) ctx->H[4] += E; } -int git_hash_init(git_hash_ctx *ctx) +int git_hash_ctx_init(git_hash_ctx *ctx) { ctx->size = 0; @@ -232,7 +232,7 @@ int git_hash_init(git_hash_ctx *ctx) ctx->H[3] = 0x10325476; ctx->H[4] = 0xc3d2e1f0; - return 0; + return 0; } int git_hash_update(git_hash_ctx *ctx, const void *data, size_t len) diff --git a/src/hash/hash_generic.h b/src/hash/hash_generic.h index b731de8b3..bebf2c27e 100644 --- a/src/hash/hash_generic.h +++ b/src/hash/hash_generic.h @@ -18,7 +18,6 @@ struct git_hash_ctx { #define git_hash_global_init() 0 #define git_hash_global_shutdown() /* noop */ -#define git_hash_ctx_init(ctx) git_hash_init(ctx) #define git_hash_ctx_cleanup(ctx) #endif /* INCLUDE_hash_generic_h__ */ diff --git a/src/hash/hash_win32.c b/src/hash/hash_win32.c index 43d54ca6d..3be3ba87a 100644 --- a/src/hash/hash_win32.c +++ b/src/hash/hash_win32.c @@ -134,7 +134,7 @@ GIT_INLINE(int) hash_ctx_cryptoapi_init(git_hash_ctx *ctx) ctx->type = CRYPTOAPI; ctx->prov = &hash_prov; - return git_hash_init(ctx); + return git_hash_ctx_init(ctx); } GIT_INLINE(int) hash_cryptoapi_init(git_hash_ctx *ctx) @@ -262,7 +262,7 @@ int git_hash_ctx_init(git_hash_ctx *ctx) return (hash_prov.type == CNG) ? hash_ctx_cng_init(ctx) : hash_ctx_cryptoapi_init(ctx); } -int git_hash_init(git_hash_ctx *ctx) +int git_hash_ctx_init(git_hash_ctx *ctx) { assert(ctx && ctx->type); return (ctx->type == CNG) ? hash_cng_init(ctx) : hash_cryptoapi_init(ctx); |
