Move gpgme_check_version to MINIT

This commit is contained in:
Jakub Zelenka 2016-12-15 18:33:57 +00:00
parent 9aaaaa7c87
commit c4b82c4dee

View file

@ -135,7 +135,6 @@ static void gnupg_res_init(PHPC_THIS_DECLARE(gnupg) TSRMLS_DC)
/* init the gpgme-lib and set the default values */
gpgme_ctx_t ctx;
gpgme_error_t err;
gpgme_check_version(NULL);
err = gpgme_new(&ctx);
if (err == GPG_ERR_NO_ERROR) {
@ -509,6 +508,9 @@ PHP_MINIT_FUNCTION(gnupg)
PHP_GNUPG_REG_CONST("GNUPG_ERROR_EXCEPTION", 2);
PHP_GNUPG_REG_CONST("GNUPG_ERROR_SILENT", 3);
/* init gpgme subsystems */
gpgme_check_version(NULL);
return SUCCESS;
}
/* }}} */