Skip to content

Commit 747f90e

Browse files
committed
rename 'try' to 'allow_not_found' to avoid conflict with c++ reserverd word
1 parent 97eb89a commit 747f90e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend_enum.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static ZEND_NAMED_FUNCTION(zend_enum_cases_func)
286286
} ZEND_HASH_FOREACH_END();
287287
}
288288

289-
ZEND_API zend_result zend_enum_get_case_by_value(zend_object **result, zend_class_entry *ce, zend_long long_key, zend_string *string_key, bool try)
289+
ZEND_API zend_result zend_enum_get_case_by_value(zend_object **result, zend_class_entry *ce, zend_long long_key, zend_string *string_key, bool allow_not_found)
290290
{
291291
if (ce->type == ZEND_USER_CLASS && !(ce->ce_flags & ZEND_ACC_CONSTANTS_UPDATED)) {
292292
if (zend_update_class_constants(ce) == FAILURE) {
@@ -310,7 +310,7 @@ ZEND_API zend_result zend_enum_get_case_by_value(zend_object **result, zend_clas
310310

311311
if (case_name_zv == NULL) {
312312
not_found:
313-
if (try) {
313+
if (allow_not_found) {
314314
*result = NULL;
315315
return SUCCESS;
316316
}

Zend/zend_enum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ZEND_API void zend_enum_add_case(zend_class_entry *ce, zend_string *case_name, z
4444
ZEND_API void zend_enum_add_case_cstr(zend_class_entry *ce, const char *name, zval *value);
4545
ZEND_API zend_object *zend_enum_get_case(zend_class_entry *ce, zend_string *name);
4646
ZEND_API zend_object *zend_enum_get_case_cstr(zend_class_entry *ce, const char *name);
47-
ZEND_API zend_result zend_enum_get_case_by_value(zend_object **result, zend_class_entry *ce, zend_long long_key, zend_string *string_key, bool try);
47+
ZEND_API zend_result zend_enum_get_case_by_value(zend_object **result, zend_class_entry *ce, zend_long long_key, zend_string *string_key, bool allow_not_found);
4848

4949
static zend_always_inline zval *zend_enum_fetch_case_name(zend_object *zobj)
5050
{

0 commit comments

Comments
 (0)