Skip to content

Commit 4986740

Browse files
committed
Remove zend_binary_zval_strcasecmp() APIs
These are thin wrappers ... around the wrong functions. They call the "_l()" version of the underlying APIs. For clarify, just call the wrapped API directly.
1 parent 605ac46 commit 4986740

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

UPGRADING.INTERNALS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ PHP 8.2 INTERNALS UPGRADE NOTES
1010
1. Internal API changes
1111
========================
1212

13+
* Removed zend_binary_zval_str(n)casecmp() APIs. These were thin wrappers
14+
around zend_binary_str(n)casecmp_l() -- rather than
15+
zend_binary_str(n)casecmp() as one would expect. Call the appropriate
16+
wrapped function directly instead.
17+
1318
========================
1419
2. Build system changes
1520
========================

Zend/zend_operators.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ static const unsigned char tolower_map[256] = {
7979
* Functions using locale lowercase:
8080
zend_binary_strncasecmp_l
8181
zend_binary_strcasecmp_l
82-
zend_binary_zval_strcasecmp
83-
zend_binary_zval_strncasecmp
8482
string_compare_function_ex
8583
string_case_compare_function
8684
* Functions using ascii lowercase:
@@ -2919,18 +2917,6 @@ ZEND_API int ZEND_FASTCALL zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3
29192917
}
29202918
/* }}} */
29212919

2922-
ZEND_API int ZEND_FASTCALL zend_binary_zval_strcasecmp(zval *s1, zval *s2) /* {{{ */
2923-
{
2924-
return zend_binary_strcasecmp_l(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
2925-
}
2926-
/* }}} */
2927-
2928-
ZEND_API int ZEND_FASTCALL zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3) /* {{{ */
2929-
{
2930-
return zend_binary_strncasecmp_l(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2), Z_LVAL_P(s3));
2931-
}
2932-
/* }}} */
2933-
29342920
ZEND_API bool ZEND_FASTCALL zendi_smart_streq(zend_string *s1, zend_string *s2) /* {{{ */
29352921
{
29362922
zend_uchar ret1, ret2;

Zend/zend_operators.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,6 @@ ZEND_API zend_string* ZEND_FASTCALL zend_string_tolower_ex(zend_string *str, boo
443443

444444
ZEND_API int ZEND_FASTCALL zend_binary_zval_strcmp(zval *s1, zval *s2);
445445
ZEND_API int ZEND_FASTCALL zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3);
446-
ZEND_API int ZEND_FASTCALL zend_binary_zval_strcasecmp(zval *s1, zval *s2);
447-
ZEND_API int ZEND_FASTCALL zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3);
448446
ZEND_API int ZEND_FASTCALL zend_binary_strcmp(const char *s1, size_t len1, const char *s2, size_t len2);
449447
ZEND_API int ZEND_FASTCALL zend_binary_strncmp(const char *s1, size_t len1, const char *s2, size_t len2, size_t length);
450448
ZEND_API int ZEND_FASTCALL zend_binary_strcasecmp(const char *s1, size_t len1, const char *s2, size_t len2);

0 commit comments

Comments
 (0)