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.
This commit is contained in:
Nikita Popov 2021-01-14 12:06:07 +01:00
parent 1b2aba285d
commit 422d1665a2
26 changed files with 95 additions and 145 deletions

View file

@ -496,7 +496,7 @@ static int php_sqlite3_collation_callback(void *context,
php_error_docref(NULL, E_WARNING, "An error occurred while invoking the callback");
} else if (!Z_ISUNDEF(retval)) {
if (Z_TYPE(retval) != IS_LONG) {
convert_to_long_ex(&retval);
convert_to_long(&retval);
}
ret = 0;
if (Z_LVAL(retval) > 0) {