diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/global.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/git2/global.h b/include/git2/global.h index 4f90c4c20..ce5bdf444 100644 --- a/include/git2/global.h +++ b/include/git2/global.h @@ -17,9 +17,11 @@ GIT_BEGIN_DECL * This function must the called before any other libgit2 function in * order to set up global state and threading. * - * This function may be called multiple times. + * This function may be called multiple times - it will return the number + * of times the initialization has been called (including this one) that have + * not subsequently been shutdown. * - * @return 0 or an error code + * @return the number of initializations of the library, or an error code. */ GIT_EXTERN(int) git_libgit2_init(void); @@ -27,10 +29,14 @@ GIT_EXTERN(int) git_libgit2_init(void); * Shutdown the global state * * Clean up the global state and threading context after calling it as - * many times as `git_libgit2_init()` was called. + * many times as `git_libgit2_init()` was called - it will return the + * number of remainining initializations that have not been shutdown + * (after this one). * + * @return the number of remaining initializations of the library, or an + * error code. */ -GIT_EXTERN(void) git_libgit2_shutdown(void); +GIT_EXTERN(int) git_libgit2_shutdown(void); /** @} */ GIT_END_DECL |