@@ -3051,14 +3051,11 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
3051
3051
3052
3052
uint32_t zend_get_class_fetch_type (zend_string * name ) /* {{{ */
3053
3053
{
3054
- if (name -> len == sizeof ("self" ) - 1 &&
3055
- !strncasecmp (name -> val , "self" , sizeof ("self" ) - 1 )) {
3054
+ if (zend_string_equals_literal_ci (name , "self" )) {
3056
3055
return ZEND_FETCH_CLASS_SELF ;
3057
- } else if (name -> len == sizeof ("parent" ) - 1 &&
3058
- !strncasecmp (name -> val , "parent" , sizeof ("parent" ) - 1 )) {
3056
+ } else if (zend_string_equals_literal_ci (name , "parent" )) {
3059
3057
return ZEND_FETCH_CLASS_PARENT ;
3060
- } else if (name -> len == sizeof ("static" ) - 1 &&
3061
- !strncasecmp (name -> val , "static" , sizeof ("static" ) - 1 )) {
3058
+ } else if (zend_string_equals_literal_ci (name , "static" )) {
3062
3059
return ZEND_FETCH_CLASS_STATIC ;
3063
3060
} else {
3064
3061
return ZEND_FETCH_CLASS_DEFAULT ;
@@ -3253,10 +3250,6 @@ static inline zend_bool zend_string_equals_str_ci(zend_string *str1, zend_string
3253
3250
}
3254
3251
/* }}} */
3255
3252
3256
- #define zend_string_equals_literal_ci (str , c ) \
3257
- ((str)->len == sizeof(c) - 1 \
3258
- && !zend_binary_strcasecmp((str)->val, (str)->len, (c), sizeof(c) - 1))
3259
-
3260
3253
static void zend_adjust_for_fetch_type (zend_op * opline , uint32_t type ) /* {{{ */
3261
3254
{
3262
3255
switch (type & BP_VAR_MASK ) {
0 commit comments