Blame include/git2/global.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_git_global_h__
Packit Service 20376f
#define INCLUDE_git_global_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
Packit Service 20376f
GIT_BEGIN_DECL
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Init the global state
Packit Service 20376f
 *
Packit Service 20376f
 * This function must be called before any other libgit2 function in
Packit Service 20376f
 * order to set up global state and threading.
Packit Service 20376f
 *
Packit Service 20376f
 * This function may be called multiple times - it will return the number
Packit Service 20376f
 * of times the initialization has been called (including this one) that have
Packit Service 20376f
 * not subsequently been shutdown.
Packit Service 20376f
 *
Packit Service 20376f
 * @return the number of initializations of the library, or an error code.
Packit Service 20376f
 */
Packit Service 20376f
GIT_EXTERN(int) git_libgit2_init(void);
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Shutdown the global state
Packit Service 20376f
 *
Packit Service 20376f
 * Clean up the global state and threading context after calling it as
Packit Service 20376f
 * many times as `git_libgit2_init()` was called - it will return the
Packit Service 20376f
 * number of remainining initializations that have not been shutdown
Packit Service 20376f
 * (after this one).
Packit Service 20376f
 * 
Packit Service 20376f
 * @return the number of remaining initializations of the library, or an
Packit Service 20376f
 * error code.
Packit Service 20376f
 */
Packit Service 20376f
GIT_EXTERN(int) git_libgit2_shutdown(void);
Packit Service 20376f
Packit Service 20376f
/** @} */
Packit Service 20376f
GIT_END_DECL
Packit Service 20376f
#endif
Packit Service 20376f