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/intl/formatter/formatter_format.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/intl/formatter/formatter_format.c')
-rw-r--r-- | ext/intl/formatter/formatter_format.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c index aa9c5915ad..f467d42c1c 100644 --- a/ext/intl/formatter/formatter_format.c +++ b/ext/intl/formatter/formatter_format.c @@ -59,7 +59,7 @@ PHP_FUNCTION( numfmt_format ) switch(type) { case FORMAT_TYPE_INT32: - convert_to_long_ex(number); + convert_to_long(number); formatted_len = unum_format(FORMATTER_OBJECT(nfo), (int32_t)Z_LVAL_P(number), formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo)); if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) { @@ -91,7 +91,7 @@ PHP_FUNCTION( numfmt_format ) break; case FORMAT_TYPE_DOUBLE: - convert_to_double_ex(number); + convert_to_double(number); formatted_len = unum_formatDouble(FORMATTER_OBJECT(nfo), Z_DVAL_P(number), formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo)); if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) { intl_error_reset(INTL_DATA_ERROR_P(nfo)); |