Name |
Last commit
|
Last update |
---|---|---|
.. | ||
failalloc.c | ||
failalloc.h | ||
stdalloc.c | ||
stdalloc.h | ||
win32_leakcheck.c | ||
win32_leakcheck.h |
We require the library to be initialized with git_libgit2_init before it is functional. However, if a user tries to uses the library without doing so - as they might when getting started with the library for the first time - we will likely crash. This commit introduces some guard rails - now instead of having _no_ allocator by default, we'll have an allocator that always fails, and never tries to set an error message (since the thread-local state is set up by git_libgit2_init). We've modified the error retrieval function to (try to) ensure that the library has been initialized before getting the thread-local error message. (Unfortunately, we cannot determine if the thread local storage has actually been configured, this does require initialization by git_libgit2_init. But a naive attempt should be good enough for most cases.)
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
failalloc.c | Loading commit data... | |
failalloc.h | Loading commit data... | |
stdalloc.c | Loading commit data... | |
stdalloc.h | Loading commit data... | |
win32_leakcheck.c | Loading commit data... | |
win32_leakcheck.h | Loading commit data... |