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/pgsql | |
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/pgsql')
-rw-r--r-- | ext/pgsql/pgsql.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 4685c7cd74..9b3471b192 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3613,7 +3613,7 @@ static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS, int entry_type) if (PQsetnonblocking(pgsql, 0)) { php_error_docref(NULL, E_NOTICE, "Cannot set connection to blocking mode"); } - convert_to_boolean_ex(return_value); + convert_to_boolean(return_value); } /* }}} */ @@ -4721,7 +4721,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con case IS_DOUBLE: ZVAL_DOUBLE(&new_val, Z_DVAL_P(val)); - convert_to_long_ex(&new_val); + convert_to_long(&new_val); break; case IS_LONG: @@ -4837,7 +4837,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con case IS_DOUBLE: ZVAL_DOUBLE(&new_val, Z_DVAL_P(val)); - convert_to_string_ex(&new_val); + convert_to_string(&new_val); break; case IS_NULL: @@ -4868,14 +4868,14 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con } else { ZVAL_STRINGL(&new_val, Z_STRVAL_P(val), Z_STRLEN_P(val)); - convert_to_long_ex(&new_val); + convert_to_long(&new_val); } } break; case IS_DOUBLE: ZVAL_DOUBLE(&new_val, Z_DVAL_P(val)); - convert_to_long_ex(&new_val); + convert_to_long(&new_val); break; case IS_LONG: @@ -5140,7 +5140,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con case IS_DOUBLE: ZVAL_DOUBLE(&new_val, Z_DVAL_P(val)); - convert_to_string_ex(&new_val); + convert_to_string(&new_val); break; case IS_NULL: |