hash: move git_hash_prov into Win32 backend

The structure `git_hash_prov` is only ever used by the Win32 SHA1
backend. As such, it doesn't make much sense to expose it via the
generic "hash.h" header, as it is an implementation detail of the Win32
backend only. Move the typedef of `git_hash_prov` into
"hash/sha1/win32.h" to fix this.
This commit is contained in:
Patrick Steinhardt
2019-02-22 13:43:16 +01:00
parent 6ffc49e110
commit bbf034ab93
2 changed files with 2 additions and 3 deletions

View File

@@ -11,7 +11,6 @@
#include "git2/oid.h"
typedef struct git_hash_prov git_hash_prov;
typedef struct git_hash_ctx git_hash_ctx;
int git_hash_ctx_init(git_hash_ctx *ctx);

View File

@@ -106,14 +106,14 @@ struct hash_cng_prov {
DWORD hash_object_size;
};
struct git_hash_prov {
typedef struct {
enum hash_win32_prov_type type;
union {
struct hash_cryptoapi_prov cryptoapi;
struct hash_cng_prov cng;
} prov;
};
} git_hash_prov;
/* Hash contexts */