diff options
Diffstat (limited to 'ext/sodium')
-rw-r--r-- | ext/sodium/libsodium.c | 5 | ||||
-rw-r--r-- | ext/sodium/libsodium.stub.php | 2 | ||||
-rw-r--r-- | ext/sodium/libsodium_arginfo.h | 13 |
3 files changed, 14 insertions, 6 deletions
diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c index bbe88ba206..7cdae32468 100644 --- a/ext/sodium/libsodium.c +++ b/ext/sodium/libsodium.c @@ -129,14 +129,11 @@ static void sodium_separate_string(zval *zv) { PHP_MINIT_FUNCTION(sodium) { - zend_class_entry ce; - if (sodium_init() < 0) { zend_error(E_ERROR, "sodium_init()"); } - INIT_CLASS_ENTRY(ce, "SodiumException", NULL); - sodium_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception); + sodium_exception_ce = register_class_SodiumException(zend_ce_exception); sodium_exception_ce->create_object = sodium_exception_create_object; REGISTER_STRING_CONSTANT("SODIUM_LIBRARY_VERSION", diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php index e8f7b54ca2..a4029d04d0 100644 --- a/ext/sodium/libsodium.stub.php +++ b/ext/sodium/libsodium.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ function sodium_crypto_aead_aes256gcm_is_available(): bool {} diff --git a/ext/sodium/libsodium_arginfo.h b/ext/sodium/libsodium_arginfo.h index 07b78aba74..aee45a5e6e 100644 --- a/ext/sodium/libsodium_arginfo.h +++ b/ext/sodium/libsodium_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b34401e98646f1e85a8dd292477cac68c6e4ac97 */ + * Stub hash: 457c4c5a0243f815d859bdc9728709b4a8dc84d7 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -666,3 +666,14 @@ static const zend_function_entry ext_functions[] = { static const zend_function_entry class_SodiumException_methods[] = { ZEND_FE_END }; + +zend_class_entry *register_class_SodiumException(zend_class_entry *class_entry_Exception) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SodiumException", class_SodiumException_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception); + + return class_entry; +} + |