diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-14 12:06:07 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-01-14 12:11:11 +0100 |
commit | 422d1665a2a744421b5911cbe8541370509bc4f5 (patch) | |
tree | fe173f4da139019d71a7bc88ffacfa8cd8f870dc /ext/sockets/multicast.c | |
parent | 1b2aba285db488852844c2eac484d35569ec4442 (diff) | |
download | php-git-422d1665a2a744421b5911cbe8541370509bc4f5.tar.gz |
Make convert_to_*_ex simple aliases of convert_to_*
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.
The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.
Also drop the unused convert_to_explicit_type macros.
Diffstat (limited to 'ext/sockets/multicast.c')
-rw-r--r-- | ext/sockets/multicast.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index 321efdc403..86ec5c14b6 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -159,7 +159,7 @@ mcast_req_fun: ; php_sockaddr_storage group = {0}; socklen_t glen; - convert_to_array_ex(arg4); + convert_to_array(arg4); opt_ht = Z_ARRVAL_P(arg4); if (php_get_address_from_array(opt_ht, "group", php_sock, &group, @@ -195,7 +195,7 @@ mcast_req_fun: ; socklen_t glen, slen; - convert_to_array_ex(arg4); + convert_to_array(arg4); opt_ht = Z_ARRVAL_P(arg4); if (php_get_address_from_array(opt_ht, "group", php_sock, &group, @@ -272,12 +272,12 @@ int php_do_setsockopt_ip_mcast(php_socket *php_sock, goto dosockopt; case IP_MULTICAST_LOOP: - convert_to_boolean_ex(arg4); + convert_to_boolean(arg4); ipv4_mcast_ttl_lback = (unsigned char) (Z_TYPE_P(arg4) == IS_TRUE); goto ipv4_loop_ttl; case IP_MULTICAST_TTL: - convert_to_long_ex(arg4); + convert_to_long(arg4); if (Z_LVAL_P(arg4) < 0L || Z_LVAL_P(arg4) > 255L) { zend_argument_value_error(4, "must be between 0 and 255"); return FAILURE; @@ -337,11 +337,11 @@ int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, goto dosockopt; case IPV6_MULTICAST_LOOP: - convert_to_boolean_ex(arg4); + convert_to_boolean(arg4); ov = (int) Z_TYPE_P(arg4) == IS_TRUE; goto ipv6_loop_hops; case IPV6_MULTICAST_HOPS: - convert_to_long_ex(arg4); + convert_to_long(arg4); if (Z_LVAL_P(arg4) < -1L || Z_LVAL_P(arg4) > 255L) { zend_argument_value_error(4, "must be between -1 and 255"); return FAILURE; |