summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ps_codec.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-01-14 12:06:07 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-01-14 12:11:11 +0100
commit422d1665a2a744421b5911cbe8541370509bc4f5 (patch)
treefe173f4da139019d71a7bc88ffacfa8cd8f870dc /ext/mysqlnd/mysqlnd_ps_codec.c
parent1b2aba285db488852844c2eac484d35569ec4442 (diff)
downloadphp-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/mysqlnd/mysqlnd_ps_codec.c')
-rw-r--r--ext/mysqlnd/mysqlnd_ps_codec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c
index 4de730777f..ebe0c5a9d8 100644
--- a/ext/mysqlnd/mysqlnd_ps_codec.c
+++ b/ext/mysqlnd/mysqlnd_ps_codec.c
@@ -603,7 +603,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie
*/
if (d >= (double) ZEND_LONG_MAX || d < (double) ZEND_LONG_MIN) {
stmt->send_types_to_server = *resend_types_next_time = 1;
- convert_to_string_ex(tmp_data);
+ convert_to_string(tmp_data);
} else {
convert_to_long(tmp_data);
}
@@ -647,7 +647,7 @@ mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval * copies, zend_u
current_type = MYSQL_TYPE_VAR_STRING;
/*
don't change stmt->param_bind[i].type to MYSQL_TYPE_VAR_STRING
- we force convert_to_long_ex in all cases, thus the type will be right in the next switch.
+ we force convert_to_long in all cases, thus the type will be right in the next switch.
if the type is however not long, then we will do a goto in the next switch.
We want to preserve the original bind type given by the user. Thus, we do these hacks.
*/
@@ -714,7 +714,7 @@ mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval
if (Z_TYPE_P(tmp_data) == IS_STRING) {
goto use_string;
}
- convert_to_long_ex(tmp_data);
+ convert_to_long(tmp_data);
}
*data_size += 4 + is_longlong;
break;
@@ -771,7 +771,7 @@ mysqlnd_stmt_execute_store_param_values(MYSQLND_STMT_DATA * stmt, zval * copies,
} else {
switch (stmt->param_bind[i].type) {
case MYSQL_TYPE_DOUBLE:
- convert_to_double_ex(data);
+ convert_to_double(data);
float8store(*p, Z_DVAL_P(data));
(*p) += 8;
break;