]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
doc: be more explicit about the usage of gnutls_global_init/deinit [ci skip]
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 24 Aug 2016 14:17:20 +0000 (16:17 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 24 Aug 2016 14:17:24 +0000 (16:17 +0200)
lib/global.c

index d75cea8330ddb62ebfd06ea5bd275537569a9a18..0b57f3d6d759303faeae28975c7f8e966c65717f 100644 (file)
@@ -194,6 +194,10 @@ static int _gnutls_init_ret = 0;
 /**
  * gnutls_global_init:
  *
+ * Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly
+ * called. To disable the implicit call (in a library constructor) of this
+ * function set the environment variable %GNUTLS_NO_EXPLICIT_INIT to 1.
+ *
  * This function performs any required precalculations, detects
  * the supported CPU capabilities and initializes the underlying
  * cryptographic backend. In order to free any resources 
@@ -207,11 +211,6 @@ static int _gnutls_init_ret = 0;
  * function can be called many times, but will only do something the
  * first time.
  *
- * Since GnuTLS 3.3.0 this function is automatically called on library
- * constructor. Since the same version this function is also thread safe.
- * The automatic initialization can be avoided if the environment variable
- * %GNUTLS_NO_EXPLICIT_INIT is set to be 1.
- *
  * A subsequent call of this function if the initial has failed will
  * return the same error code.
  *
@@ -456,6 +455,10 @@ static void _gnutls_global_deinit(unsigned destructor)
  * This function deinitializes the global data, that were initialized
  * using gnutls_global_init().
  *
+ * Since GnuTLS 3.3.0 this function is no longer necessary to be explicitly
+ * called. GnuTLS will automatically deinitialize on library destructor. See
+ * gnutls_global_init() for disabling the implicit initialization/deinitialization.
+ *
  **/
 void gnutls_global_deinit(void)
 {