Skip to content

Commit 35a5491

Browse files
committed
Make const naming more precise
1 parent a64d1e9 commit 35a5491

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8988,7 +8988,7 @@ static void zend_compile_implements(zend_ast *ast) /* {{{ */
89888988
interface_names[i].name =
89898989
zend_resolve_const_class_name_reference(class_ast, "interface name");
89908990
interface_names[i].lc_name = zend_string_tolower(interface_names[i].name);
8991-
interface_names[i].is_optional = class_ast->attr & ZEND_CLASS_NAME_OPTIONAL;
8991+
interface_names[i].is_optional = class_ast->attr & ZEND_NAME_OPTIONAL;
89928992
}
89938993

89948994
ce->num_interfaces = list->children;

Zend/zend_compile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ ZEND_API zend_string *zend_type_to_string(zend_type type);
10351035
#define ZEND_NAME_NOT_FQ 1
10361036
#define ZEND_NAME_RELATIVE 2
10371037

1038-
#define ZEND_CLASS_NAME_OPTIONAL 4
1038+
#define ZEND_NAME_OPTIONAL 4
10391039

10401040
/* ZEND_FETCH_ flags in class name AST of new const expression must not clash with ZEND_NAME_ flags */
10411041
#define ZEND_CONST_EXPR_NEW_FETCH_TYPE_SHIFT 2

Zend/zend_language_parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,7 @@ class_name:
14191419

14201420
interface_name:
14211421
class_name { $$ = $1; }
1422-
| '?' name { $$ = $2; $$->attr |= ZEND_CLASS_NAME_OPTIONAL; }
1422+
| '?' name { $$ = $2; $$->attr |= ZEND_NAME_OPTIONAL; }
14231423
;
14241424

14251425
class_name_reference:

0 commit comments

Comments
 (0)