Skip to content

Commit bbf034a

Browse files
committed
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.
1 parent 6ffc49e commit bbf034a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/hash.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include "git2/oid.h"
1313

14-
typedef struct git_hash_prov git_hash_prov;
1514
typedef struct git_hash_ctx git_hash_ctx;
1615

1716
int git_hash_ctx_init(git_hash_ctx *ctx);

src/hash/hash_win32.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ struct hash_cng_prov {
106106
DWORD hash_object_size;
107107
};
108108

109-
struct git_hash_prov {
109+
typedef struct {
110110
enum hash_win32_prov_type type;
111111

112112
union {
113113
struct hash_cryptoapi_prov cryptoapi;
114114
struct hash_cng_prov cng;
115115
} prov;
116-
};
116+
} git_hash_prov;
117117

118118
/* Hash contexts */
119119

0 commit comments

Comments
 (0)