From: Máté Kocsis Date: Sun, 5 Apr 2020 19:15:30 +0000 (+0200) Subject: Generate function entries for another batch of extensions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21cfa03f1740042d0c48269430e0490e319e1408;p=php Generate function entries for another batch of extensions Closes GH-5352 --- diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index edc2020f46..ec72c79b60 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -61,14 +61,6 @@ static HashTable php_libxml_exports; static ZEND_DECLARE_MODULE_GLOBALS(libxml) static PHP_GINIT_FUNCTION(libxml); -static PHP_FUNCTION(libxml_set_streams_context); -static PHP_FUNCTION(libxml_use_internal_errors); -static PHP_FUNCTION(libxml_get_last_error); -static PHP_FUNCTION(libxml_clear_errors); -static PHP_FUNCTION(libxml_get_errors); -static PHP_FUNCTION(libxml_set_external_entity_loader); -static PHP_FUNCTION(libxml_disable_entity_loader); - static zend_class_entry *libxmlerror_class_entry; /* {{{ dynamically loadable module stuff */ @@ -90,22 +82,10 @@ static int php_libxml_post_deactivate(void); /* }}} */ -/* {{{ extension definition structures */ -static const zend_function_entry libxml_functions[] = { - PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context) - PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors) - PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error) - PHP_FE(libxml_clear_errors, arginfo_libxml_clear_errors) - PHP_FE(libxml_get_errors, arginfo_libxml_get_errors) - PHP_FE(libxml_disable_entity_loader, arginfo_libxml_disable_entity_loader) - PHP_FE(libxml_set_external_entity_loader, arginfo_libxml_set_external_entity_loader) - PHP_FE_END -}; - zend_module_entry libxml_module_entry = { STANDARD_MODULE_HEADER, "libxml", /* extension name */ - libxml_functions, /* extension function list */ + ext_functions, /* extension function list */ PHP_MINIT(libxml), /* extension-wide startup function */ PHP_MSHUTDOWN(libxml), /* extension-wide shutdown function */ PHP_RINIT(libxml), /* per-request startup function */ @@ -913,7 +893,7 @@ static PHP_MINFO_FUNCTION(libxml) /* {{{ proto void libxml_set_streams_context(resource streams_context) Set the streams context for the next libxml document load or write */ -static PHP_FUNCTION(libxml_set_streams_context) +PHP_FUNCTION(libxml_set_streams_context) { zval *arg; @@ -931,7 +911,7 @@ static PHP_FUNCTION(libxml_set_streams_context) /* {{{ proto bool libxml_use_internal_errors([boolean use_errors]) Disable libxml errors and allow user to fetch error information as needed */ -static PHP_FUNCTION(libxml_use_internal_errors) +PHP_FUNCTION(libxml_use_internal_errors) { xmlStructuredErrorFunc current_handler; zend_bool use_errors=0, retval; @@ -972,7 +952,7 @@ static PHP_FUNCTION(libxml_use_internal_errors) /* {{{ proto object libxml_get_last_error() Retrieve last error from libxml */ -static PHP_FUNCTION(libxml_get_last_error) +PHP_FUNCTION(libxml_get_last_error) { xmlErrorPtr error; @@ -1004,7 +984,7 @@ static PHP_FUNCTION(libxml_get_last_error) /* {{{ proto object libxml_get_errors() Retrieve array of errors */ -static PHP_FUNCTION(libxml_get_errors) +PHP_FUNCTION(libxml_get_errors) { xmlErrorPtr error; @@ -1046,7 +1026,7 @@ static PHP_FUNCTION(libxml_get_errors) /* {{{ proto void libxml_clear_errors() Clear last error from libxml */ -static PHP_FUNCTION(libxml_clear_errors) +PHP_FUNCTION(libxml_clear_errors) { ZEND_PARSE_PARAMETERS_NONE(); @@ -1067,7 +1047,7 @@ PHP_LIBXML_API zend_bool php_libxml_disable_entity_loader(zend_bool disable) /* /* {{{ proto bool libxml_disable_entity_loader([boolean disable]) Disable/Enable ability to load external entities */ -static PHP_FUNCTION(libxml_disable_entity_loader) +PHP_FUNCTION(libxml_disable_entity_loader) { zend_bool disable = 1; @@ -1082,7 +1062,7 @@ static PHP_FUNCTION(libxml_disable_entity_loader) /* {{{ proto void libxml_set_external_entity_loader(callback resolver_function) Changes the default external entity loader */ -static PHP_FUNCTION(libxml_set_external_entity_loader) +PHP_FUNCTION(libxml_set_external_entity_loader) { zend_fcall_info fci; zend_fcall_info_cache fcc; diff --git a/ext/libxml/libxml.stub.php b/ext/libxml/libxml.stub.php index 7022b2e1f8..729b91a2ec 100644 --- a/ext/libxml/libxml.stub.php +++ b/ext/libxml/libxml.stub.php @@ -1,5 +1,7 @@ = 4 diff --git a/ext/opcache/opcache.stub.php b/ext/opcache/opcache.stub.php index a60f237642..0290b6453d 100644 --- a/ext/opcache/opcache.stub.php +++ b/ext/opcache/opcache.stub.php @@ -1,5 +1,7 @@ #endif -PHP_FUNCTION(readline); -PHP_FUNCTION(readline_add_history); -PHP_FUNCTION(readline_info); -PHP_FUNCTION(readline_clear_history); -#ifdef HAVE_HISTORY_LIST -PHP_FUNCTION(readline_list_history); -#endif -PHP_FUNCTION(readline_read_history); -PHP_FUNCTION(readline_write_history); -PHP_FUNCTION(readline_completion_function); - #if HAVE_RL_CALLBACK_READ_CHAR -PHP_FUNCTION(readline_callback_handler_install); -PHP_FUNCTION(readline_callback_read_char); -PHP_FUNCTION(readline_callback_handler_remove); -PHP_FUNCTION(readline_redisplay); -PHP_FUNCTION(readline_on_new_line); static zval _prepped_callback; @@ -71,33 +55,10 @@ PHP_MINFO_FUNCTION(readline); /* }}} */ /* {{{ module stuff */ -static const zend_function_entry php_readline_functions[] = { - PHP_FE(readline, arginfo_readline) - PHP_FE(readline_info, arginfo_readline_info) - PHP_FE(readline_add_history, arginfo_readline_add_history) - PHP_FE(readline_clear_history, arginfo_readline_clear_history) -#ifdef HAVE_HISTORY_LIST - PHP_FE(readline_list_history, arginfo_readline_list_history) -#endif - PHP_FE(readline_read_history, arginfo_readline_read_history) - PHP_FE(readline_write_history, arginfo_readline_write_history) - PHP_FE(readline_completion_function,arginfo_readline_completion_function) -#if HAVE_RL_CALLBACK_READ_CHAR - PHP_FE(readline_callback_handler_install, arginfo_readline_callback_handler_install) - PHP_FE(readline_callback_read_char, arginfo_readline_callback_read_char) - PHP_FE(readline_callback_handler_remove, arginfo_readline_callback_handler_remove) - PHP_FE(readline_redisplay, arginfo_readline_redisplay) -#endif -#if HAVE_RL_ON_NEW_LINE - PHP_FE(readline_on_new_line, arginfo_readline_on_new_line) -#endif - PHP_FE_END -}; - zend_module_entry readline_module_entry = { STANDARD_MODULE_HEADER, "readline", - php_readline_functions, + ext_functions, PHP_MINIT(readline), PHP_MSHUTDOWN(readline), NULL, diff --git a/ext/readline/readline.stub.php b/ext/readline/readline.stub.php index ed383561d1..7cf2b8b144 100644 --- a/ext/readline/readline.stub.php +++ b/ext/readline/readline.stub.php @@ -1,5 +1,7 @@ 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6) - PHP_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash) -#endif -#ifdef crypto_pwhash_scryptsalsa208sha256_SALTBYTES - PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256) - PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str) - PHP_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify) -#endif - PHP_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult) - PHP_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox) - PHP_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen) - PHP_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open) -#ifdef crypto_secretstream_xchacha20poly1305_ABYTES - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull) - PHP_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey) -#endif - PHP_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash) - PHP_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen) - PHP_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign) - PHP_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached) - PHP_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519) - PHP_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519) - PHP_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair) - PHP_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey) - PHP_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open) - PHP_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey) - PHP_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey) - PHP_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey) - PHP_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair) - PHP_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached) - PHP_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream) - PHP_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen) - PHP_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor) - - /* helpers */ - - PHP_FE(sodium_add, arginfo_sodium_add) - PHP_FE(sodium_compare, arginfo_sodium_compare) - PHP_FE(sodium_increment, arginfo_sodium_increment) - PHP_FE(sodium_memcmp, arginfo_sodium_memcmp) - PHP_FE(sodium_memzero, arginfo_sodium_memzero) - PHP_FE(sodium_pad, arginfo_sodium_pad) - PHP_FE(sodium_unpad, arginfo_sodium_unpad) - - /* codecs */ - - PHP_FE(sodium_bin2hex, arginfo_sodium_bin2hex) - PHP_FE(sodium_hex2bin, arginfo_sodium_hex2bin) -#ifdef sodium_base64_VARIANT_ORIGINAL - PHP_FE(sodium_bin2base64, arginfo_sodium_bin2base64) - PHP_FE(sodium_base642bin, arginfo_sodium_base642bin) -#endif - - /* aliases */ - - PHP_FALIAS(sodium_crypto_scalarmult_base, sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base) - - PHP_FE_END -}; - /* Load after the "standard" module in order to give it * priority in registering argon2i/argon2id password hashers. */ @@ -192,7 +79,7 @@ zend_module_entry sodium_module_entry = { NULL, sodium_deps, "sodium", - sodium_functions, + ext_functions, PHP_MINIT(sodium), PHP_MSHUTDOWN(sodium), NULL, diff --git a/ext/sodium/libsodium.stub.php b/ext/sodium/libsodium.stub.php index 37e6a5734d..73051b70cf 100644 --- a/ext/sodium/libsodium.stub.php +++ b/ext/sodium/libsodium.stub.php @@ -1,5 +1,7 @@ 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6) +ZEND_FUNCTION(sodium_crypto_pwhash_str_needs_rehash); +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) +ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256); +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) +ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str); +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) +ZEND_FUNCTION(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify); +#endif +ZEND_FUNCTION(sodium_crypto_scalarmult); +ZEND_FUNCTION(sodium_crypto_secretbox); +ZEND_FUNCTION(sodium_crypto_secretbox_keygen); +ZEND_FUNCTION(sodium_crypto_secretbox_open); +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_keygen); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_push); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_push); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_init_pull); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_pull); +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) +ZEND_FUNCTION(sodium_crypto_secretstream_xchacha20poly1305_rekey); +#endif +ZEND_FUNCTION(sodium_crypto_shorthash); +ZEND_FUNCTION(sodium_crypto_shorthash_keygen); +ZEND_FUNCTION(sodium_crypto_sign); +ZEND_FUNCTION(sodium_crypto_sign_detached); +ZEND_FUNCTION(sodium_crypto_sign_ed25519_pk_to_curve25519); +ZEND_FUNCTION(sodium_crypto_sign_ed25519_sk_to_curve25519); +ZEND_FUNCTION(sodium_crypto_sign_keypair); +ZEND_FUNCTION(sodium_crypto_sign_keypair_from_secretkey_and_publickey); +ZEND_FUNCTION(sodium_crypto_sign_open); +ZEND_FUNCTION(sodium_crypto_sign_publickey); +ZEND_FUNCTION(sodium_crypto_sign_secretkey); +ZEND_FUNCTION(sodium_crypto_sign_publickey_from_secretkey); +ZEND_FUNCTION(sodium_crypto_sign_seed_keypair); +ZEND_FUNCTION(sodium_crypto_sign_verify_detached); +ZEND_FUNCTION(sodium_crypto_stream); +ZEND_FUNCTION(sodium_crypto_stream_keygen); +ZEND_FUNCTION(sodium_crypto_stream_xor); +ZEND_FUNCTION(sodium_add); +ZEND_FUNCTION(sodium_compare); +ZEND_FUNCTION(sodium_increment); +ZEND_FUNCTION(sodium_memcmp); +ZEND_FUNCTION(sodium_memzero); +ZEND_FUNCTION(sodium_pad); +ZEND_FUNCTION(sodium_unpad); +ZEND_FUNCTION(sodium_bin2hex); +ZEND_FUNCTION(sodium_hex2bin); +#if defined(sodium_base64_VARIANT_ORIGINAL) +ZEND_FUNCTION(sodium_bin2base64); +#endif +#if defined(sodium_base64_VARIANT_ORIGINAL) +ZEND_FUNCTION(sodium_base642bin); +#endif + + +static const zend_function_entry ext_functions[] = { + ZEND_FE(sodium_crypto_aead_aes256gcm_is_available, arginfo_sodium_crypto_aead_aes256gcm_is_available) +#if defined(HAVE_AESGCM) + ZEND_FE(sodium_crypto_aead_aes256gcm_decrypt, arginfo_sodium_crypto_aead_aes256gcm_decrypt) +#endif +#if defined(HAVE_AESGCM) + ZEND_FE(sodium_crypto_aead_aes256gcm_encrypt, arginfo_sodium_crypto_aead_aes256gcm_encrypt) +#endif +#if defined(HAVE_AESGCM) + ZEND_FE(sodium_crypto_aead_aes256gcm_keygen, arginfo_sodium_crypto_aead_aes256gcm_keygen) +#endif + ZEND_FE(sodium_crypto_aead_chacha20poly1305_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_decrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_encrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_keygen) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_decrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_encrypt) + ZEND_FE(sodium_crypto_aead_chacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_chacha20poly1305_ietf_keygen) +#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) + ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_decrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_decrypt) +#endif +#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) + ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_keygen, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_keygen) +#endif +#if defined(crypto_aead_xchacha20poly1305_IETF_NPUBBYTES) + ZEND_FE(sodium_crypto_aead_xchacha20poly1305_ietf_encrypt, arginfo_sodium_crypto_aead_xchacha20poly1305_ietf_encrypt) +#endif + ZEND_FE(sodium_crypto_auth, arginfo_sodium_crypto_auth) + ZEND_FE(sodium_crypto_auth_keygen, arginfo_sodium_crypto_auth_keygen) + ZEND_FE(sodium_crypto_auth_verify, arginfo_sodium_crypto_auth_verify) + ZEND_FE(sodium_crypto_box, arginfo_sodium_crypto_box) + ZEND_FE(sodium_crypto_box_keypair, arginfo_sodium_crypto_box_keypair) + ZEND_FE(sodium_crypto_box_seed_keypair, arginfo_sodium_crypto_box_seed_keypair) + ZEND_FE(sodium_crypto_box_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_box_keypair_from_secretkey_and_publickey) + ZEND_FE(sodium_crypto_box_open, arginfo_sodium_crypto_box_open) + ZEND_FE(sodium_crypto_box_publickey, arginfo_sodium_crypto_box_publickey) + ZEND_FE(sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_box_publickey_from_secretkey) + ZEND_FE(sodium_crypto_box_seal, arginfo_sodium_crypto_box_seal) + ZEND_FE(sodium_crypto_box_seal_open, arginfo_sodium_crypto_box_seal_open) + ZEND_FE(sodium_crypto_box_secretkey, arginfo_sodium_crypto_box_secretkey) + ZEND_FE(sodium_crypto_kx_keypair, arginfo_sodium_crypto_kx_keypair) + ZEND_FE(sodium_crypto_kx_publickey, arginfo_sodium_crypto_kx_publickey) + ZEND_FE(sodium_crypto_kx_secretkey, arginfo_sodium_crypto_kx_secretkey) + ZEND_FE(sodium_crypto_kx_seed_keypair, arginfo_sodium_crypto_kx_seed_keypair) + ZEND_FE(sodium_crypto_kx_client_session_keys, arginfo_sodium_crypto_kx_client_session_keys) + ZEND_FE(sodium_crypto_kx_server_session_keys, arginfo_sodium_crypto_kx_server_session_keys) + ZEND_FE(sodium_crypto_generichash, arginfo_sodium_crypto_generichash) + ZEND_FE(sodium_crypto_generichash_keygen, arginfo_sodium_crypto_generichash_keygen) + ZEND_FE(sodium_crypto_generichash_init, arginfo_sodium_crypto_generichash_init) + ZEND_FE(sodium_crypto_generichash_update, arginfo_sodium_crypto_generichash_update) + ZEND_FE(sodium_crypto_generichash_final, arginfo_sodium_crypto_generichash_final) + ZEND_FE(sodium_crypto_kdf_derive_from_key, arginfo_sodium_crypto_kdf_derive_from_key) + ZEND_FE(sodium_crypto_kdf_keygen, arginfo_sodium_crypto_kdf_keygen) +#if defined(crypto_pwhash_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash, arginfo_sodium_crypto_pwhash) +#endif +#if defined(crypto_pwhash_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_str, arginfo_sodium_crypto_pwhash_str) +#endif +#if defined(crypto_pwhash_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_str_verify, arginfo_sodium_crypto_pwhash_str_verify) +#endif +#if SODIUM_LIBRARY_VERSION_MAJOR > 9 || (SODIUM_LIBRARY_VERSION_MAJOR == 9 && SODIUM_LIBRARY_VERSION_MINOR >= 6) + ZEND_FE(sodium_crypto_pwhash_str_needs_rehash, arginfo_sodium_crypto_pwhash_str_needs_rehash) +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256) +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str) +#endif +#if defined(crypto_pwhash_scryptsalsa208sha256_SALTBYTES) + ZEND_FE(sodium_crypto_pwhash_scryptsalsa208sha256_str_verify, arginfo_sodium_crypto_pwhash_scryptsalsa208sha256_str_verify) +#endif + ZEND_FE(sodium_crypto_scalarmult, arginfo_sodium_crypto_scalarmult) + ZEND_FE(sodium_crypto_secretbox, arginfo_sodium_crypto_secretbox) + ZEND_FE(sodium_crypto_secretbox_keygen, arginfo_sodium_crypto_secretbox_keygen) + ZEND_FE(sodium_crypto_secretbox_open, arginfo_sodium_crypto_secretbox_open) +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_keygen, arginfo_sodium_crypto_secretstream_xchacha20poly1305_keygen) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_push) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_push, arginfo_sodium_crypto_secretstream_xchacha20poly1305_push) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_init_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_init_pull) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_pull, arginfo_sodium_crypto_secretstream_xchacha20poly1305_pull) +#endif +#if defined(crypto_secretstream_xchacha20poly1305_ABYTES) + ZEND_FE(sodium_crypto_secretstream_xchacha20poly1305_rekey, arginfo_sodium_crypto_secretstream_xchacha20poly1305_rekey) +#endif + ZEND_FE(sodium_crypto_shorthash, arginfo_sodium_crypto_shorthash) + ZEND_FE(sodium_crypto_shorthash_keygen, arginfo_sodium_crypto_shorthash_keygen) + ZEND_FE(sodium_crypto_sign, arginfo_sodium_crypto_sign) + ZEND_FE(sodium_crypto_sign_detached, arginfo_sodium_crypto_sign_detached) + ZEND_FE(sodium_crypto_sign_ed25519_pk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_pk_to_curve25519) + ZEND_FE(sodium_crypto_sign_ed25519_sk_to_curve25519, arginfo_sodium_crypto_sign_ed25519_sk_to_curve25519) + ZEND_FE(sodium_crypto_sign_keypair, arginfo_sodium_crypto_sign_keypair) + ZEND_FE(sodium_crypto_sign_keypair_from_secretkey_and_publickey, arginfo_sodium_crypto_sign_keypair_from_secretkey_and_publickey) + ZEND_FE(sodium_crypto_sign_open, arginfo_sodium_crypto_sign_open) + ZEND_FE(sodium_crypto_sign_publickey, arginfo_sodium_crypto_sign_publickey) + ZEND_FE(sodium_crypto_sign_secretkey, arginfo_sodium_crypto_sign_secretkey) + ZEND_FE(sodium_crypto_sign_publickey_from_secretkey, arginfo_sodium_crypto_sign_publickey_from_secretkey) + ZEND_FE(sodium_crypto_sign_seed_keypair, arginfo_sodium_crypto_sign_seed_keypair) + ZEND_FE(sodium_crypto_sign_verify_detached, arginfo_sodium_crypto_sign_verify_detached) + ZEND_FE(sodium_crypto_stream, arginfo_sodium_crypto_stream) + ZEND_FE(sodium_crypto_stream_keygen, arginfo_sodium_crypto_stream_keygen) + ZEND_FE(sodium_crypto_stream_xor, arginfo_sodium_crypto_stream_xor) + ZEND_FE(sodium_add, arginfo_sodium_add) + ZEND_FE(sodium_compare, arginfo_sodium_compare) + ZEND_FE(sodium_increment, arginfo_sodium_increment) + ZEND_FE(sodium_memcmp, arginfo_sodium_memcmp) + ZEND_FE(sodium_memzero, arginfo_sodium_memzero) + ZEND_FE(sodium_pad, arginfo_sodium_pad) + ZEND_FE(sodium_unpad, arginfo_sodium_unpad) + ZEND_FE(sodium_bin2hex, arginfo_sodium_bin2hex) + ZEND_FE(sodium_hex2bin, arginfo_sodium_hex2bin) +#if defined(sodium_base64_VARIANT_ORIGINAL) + ZEND_FE(sodium_bin2base64, arginfo_sodium_bin2base64) +#endif +#if defined(sodium_base64_VARIANT_ORIGINAL) + ZEND_FE(sodium_base642bin, arginfo_sodium_base642bin) +#endif + ZEND_FALIAS(sodium_crypto_scalarmult_base, sodium_crypto_box_publickey_from_secretkey, arginfo_sodium_crypto_scalarmult_base) + ZEND_FE_END +}; diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index b9bedfa9de..9721193945 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -33,14 +33,6 @@ PHP_MINIT_FUNCTION(sysvmsg); PHP_MINFO_FUNCTION(sysvmsg); -PHP_FUNCTION(msg_get_queue); -PHP_FUNCTION(msg_remove_queue); -PHP_FUNCTION(msg_stat_queue); -PHP_FUNCTION(msg_set_queue); -PHP_FUNCTION(msg_send); -PHP_FUNCTION(msg_receive); -PHP_FUNCTION(msg_queue_exists); - typedef struct { key_t key; zend_long id; @@ -61,28 +53,12 @@ struct php_msgbuf { /* True global resources - no need for thread safety here */ static int le_sysvmsg; -/* {{{ sysvmsg_functions[] - * - * Every user visible function must have an entry in sysvmsg_functions[]. - */ -static const zend_function_entry sysvmsg_functions[] = { - PHP_FE(msg_get_queue, arginfo_msg_get_queue) - PHP_FE(msg_send, arginfo_msg_send) - PHP_FE(msg_receive, arginfo_msg_receive) - PHP_FE(msg_remove_queue, arginfo_msg_remove_queue) - PHP_FE(msg_stat_queue, arginfo_msg_stat_queue) - PHP_FE(msg_set_queue, arginfo_msg_set_queue) - PHP_FE(msg_queue_exists, arginfo_msg_queue_exists) - PHP_FE_END -}; -/* }}} */ - /* {{{ sysvmsg_module_entry */ zend_module_entry sysvmsg_module_entry = { STANDARD_MODULE_HEADER, "sysvmsg", - sysvmsg_functions, + ext_functions, PHP_MINIT(sysvmsg), NULL, NULL, diff --git a/ext/sysvmsg/sysvmsg.stub.php b/ext/sysvmsg/sysvmsg.stub.php index 27b59d950a..5bbe100ca6 100644 --- a/ext/sysvmsg/sysvmsg.stub.php +++ b/ext/sysvmsg/sysvmsg.stub.php @@ -1,5 +1,7 @@ extension #%d pcre version %s ] { } - Return [ array|string|null ] } + Function [ function preg_filter ] { + + - Parameters [5] { + Parameter #0 [ $regex ] + Parameter #1 [ $replace ] + Parameter #2 [ $subject ] + Parameter #3 [ int $limit ] + Parameter #4 [ &$count ] + } + - Return [ array|string|null ] + } Function [ function preg_replace_callback ] { - Parameters [6] { @@ -121,17 +132,6 @@ string(%d) "Extension [ extension #%d pcre version %s ] { } - Return [ array|string|null ] } - Function [ function preg_filter ] { - - - Parameters [5] { - Parameter #0 [ $regex ] - Parameter #1 [ $replace ] - Parameter #2 [ $subject ] - Parameter #3 [ int $limit ] - Parameter #4 [ &$count ] - } - - Return [ array|string|null ] - } Function [ function preg_split ] { - Parameters [4] {