summaryrefslogtreecommitdiff
path: root/src/hash
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-05-15 11:47:09 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2020-10-11 20:13:04 +0100
commite316b0d3d64eb8f65f4109c1565d929b29e1d33a (patch)
tree1742e4956f2a8a91ef574cf67c6d05d91910407f /src/hash
parent8970acb750ecf4b86883d9ea1a8cb280517e6c86 (diff)
downloadlibgit2-e316b0d3d64eb8f65f4109c1565d929b29e1d33a.tar.gz
runtime: move init/shutdown into the "runtime"
Provide a mechanism for system components to register for initialization and shutdown of the libgit2 runtime.
Diffstat (limited to 'src/hash')
-rw-r--r--src/hash/sha1/win32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/hash/sha1/win32.c b/src/hash/sha1/win32.c
index c73695665..b1266cca0 100644
--- a/src/hash/sha1/win32.c
+++ b/src/hash/sha1/win32.c
@@ -7,7 +7,7 @@
#include "win32.h"
-#include "global.h"
+#include "runtime.h"
#include <wincrypt.h>
#include <strsafe.h>
@@ -129,7 +129,8 @@ int git_hash_sha1_global_init(void)
if ((error = hash_cng_prov_init()) < 0)
error = hash_cryptoapi_prov_init();
- git__on_shutdown(sha1_shutdown);
+ if (!error)
+ error = git_runtime_shutdown_register(sha1_shutdown);
return error;
}