Name |
Last commit
|
Last update |
---|---|---|
.. | ||
sha1dc | ||
hash_collisiondetect.h | ||
hash_common_crypto.h | ||
hash_generic.c | ||
hash_generic.h | ||
hash_mbedtls.c | ||
hash_mbedtls.h | ||
hash_openssl.h | ||
hash_win32.c | ||
hash_win32.h |
The `git_hash_global_init` function is simply defined as a macro to zero for most of the different hash implementations. This makes it impossible to treat it like a function pointer, which is required for a later commit where we want to improve the way global initialization works. Fix the issue by converting all no-op macros to an inline function returning zero. There's a small gotcha here, though: as most hash implementations only have a header file, but not a corresponding implementation file, we cannot declare the function as non-static. But declaring it as `static inline` fails, too, as there is a previous declaration as non-static. So we have to move the function declaration after the include that brings in the function definition, as it is allowed to have a non-static declaration after a static definition, but not the other way round.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
sha1dc | Loading commit data... | |
hash_collisiondetect.h | Loading commit data... | |
hash_common_crypto.h | Loading commit data... | |
hash_generic.c | Loading commit data... | |
hash_generic.h | Loading commit data... | |
hash_mbedtls.c | Loading commit data... | |
hash_mbedtls.h | Loading commit data... | |
hash_openssl.h | Loading commit data... | |
hash_win32.c | Loading commit data... | |
hash_win32.h | Loading commit data... |