diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 1db18168564..b80b089e294 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -91,34 +91,6 @@ static const unsigned char tolower_map[256] = { zend_binary_strncasecmp */ -ZEND_API int ZEND_FASTCALL zend_atoi(const char *str, size_t str_len) /* {{{ */ -{ - int retval; - - if (!str_len) { - str_len = strlen(str); - } - retval = ZEND_STRTOL(str, NULL, 0); - if (str_len>0) { - switch (str[str_len-1]) { - case 'g': - case 'G': - retval *= 1024; - ZEND_FALLTHROUGH; - case 'm': - case 'M': - retval *= 1024; - ZEND_FALLTHROUGH; - case 'k': - case 'K': - retval *= 1024; - break; - } - } - return retval; -} -/* }}} */ - ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len) /* {{{ */ { zend_long retval; diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 90df4b42fe5..f4dd47f58de 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -458,7 +458,6 @@ ZEND_API int ZEND_FASTCALL zend_compare_symbol_tables(HashTable *ht1, HashTable ZEND_API int ZEND_FASTCALL zend_compare_arrays(zval *a1, zval *a2); ZEND_API int ZEND_FASTCALL zend_compare_objects(zval *o1, zval *o2); -ZEND_API int ZEND_FASTCALL zend_atoi(const char *str, size_t str_len); ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len); #define convert_to_null_ex(zv) convert_to_null(zv) diff --git a/ext/ffi/tests/bug78270_1.phpt b/ext/ffi/tests/bug78270_1.phpt index 7544ccb5ebc..edc212bdd2c 100644 --- a/ext/ffi/tests/bug78270_1.phpt +++ b/ext/ffi/tests/bug78270_1.phpt @@ -2,6 +2,7 @@ FR #78270 (Usage of __vectorcall convention with FFI) --EXTENSIONS-- ffi +zend_test --SKIPIF-- .*clang.*/', $info)) die("skip not for clang"); try { FFI::cdef(<<zend_atoi("17.4", 4)); + __vectorcall int bug78270(const char *str, size_t str_len); +EOC, "php_zend_test.dll"); +var_dump($ffi->bug78270("17.4", 4)); ?> --EXPECT-- int(17) diff --git a/ext/ffi/tests/bug78270_2.phpt b/ext/ffi/tests/bug78270_2.phpt index b454d277ea8..c17b143cf7d 100644 --- a/ext/ffi/tests/bug78270_2.phpt +++ b/ext/ffi/tests/bug78270_2.phpt @@ -2,6 +2,7 @@ FR #78270 (Usage of __vectorcall convention with FFI) --EXTENSIONS-- ffi +zend_test --SKIPIF--