mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-22 22:37:10 +00:00
Move gpgme_check_version to MINIT
This commit is contained in:
parent
9aaaaa7c87
commit
c4b82c4dee
1 changed files with 3 additions and 1 deletions
4
gnupg.c
4
gnupg.c
|
@ -135,7 +135,6 @@ static void gnupg_res_init(PHPC_THIS_DECLARE(gnupg) TSRMLS_DC)
|
||||||
/* init the gpgme-lib and set the default values */
|
/* init the gpgme-lib and set the default values */
|
||||||
gpgme_ctx_t ctx;
|
gpgme_ctx_t ctx;
|
||||||
gpgme_error_t err;
|
gpgme_error_t err;
|
||||||
gpgme_check_version(NULL);
|
|
||||||
|
|
||||||
err = gpgme_new(&ctx);
|
err = gpgme_new(&ctx);
|
||||||
if (err == GPG_ERR_NO_ERROR) {
|
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_EXCEPTION", 2);
|
||||||
PHP_GNUPG_REG_CONST("GNUPG_ERROR_SILENT", 3);
|
PHP_GNUPG_REG_CONST("GNUPG_ERROR_SILENT", 3);
|
||||||
|
|
||||||
|
/* init gpgme subsystems */
|
||||||
|
gpgme_check_version(NULL);
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
Loading…
Reference in a new issue