diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-12-03 15:28:44 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-12-04 20:42:27 -0500 |
commit | 6d91dc53514aa9eec4bdf2326d1f7657ac2426b3 (patch) | |
tree | 562fc7818cef583864792a8b4cb261a067f90119 /include | |
parent | 792d750bed52070ffd10ecb96d12c4889c162ee4 (diff) | |
download | libgit2-6d91dc53514aa9eec4bdf2326d1f7657ac2426b3.tar.gz |
init: return the number of initializations
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 |