Skip to content

Commit 161ae71

Browse files
committed
zend_hash_apply() doesn't use ZEND_HASH_APPLY_... macros
1 parent a8dbb0d commit 161ae71

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Zend/zend_constants.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC)
6161

6262
static int clean_non_persistent_constant_full(zend_constant *c TSRMLS_DC)
6363
{
64-
return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
64+
return (c->flags & CONST_PERSISTENT) ? 0 : 1;
6565
}
6666

6767

Zend/zend_execute_API.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static int clean_non_persistent_function(zend_function *function TSRMLS_DC)
103103

104104
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC)
105105
{
106-
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
106+
return (function->type != ZEND_INTERNAL_FUNCTION);
107107
}
108108

109109

@@ -115,7 +115,7 @@ static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC)
115115

116116
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC)
117117
{
118-
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
118+
return ((*ce)->type != ZEND_INTERNAL_CLASS);
119119
}
120120

121121

Zend/zend_opcode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC)
143143
if (function->type == ZEND_USER_FUNCTION) {
144144
zend_cleanup_op_array_data((zend_op_array *) function);
145145
}
146-
return ZEND_HASH_APPLY_KEEP;
146+
return 0;
147147
}
148148

149149
ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)

0 commit comments

Comments
 (0)