summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_execute.c2
-rwxr-xr-xZend/zend_interfaces.c10
-rwxr-xr-xZend/zend_iterators.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 645c52861e..6d5980abc6 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -3756,7 +3756,7 @@ int zend_fe_fetch_handler(ZEND_OPCODE_HANDLER_ARGS)
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter TSRMLS_CC);
}
- if (!iter || iter->funcs->has_more(iter TSRMLS_CC) == FAILURE) {
+ if (!iter || iter->funcs->valid(iter TSRMLS_CC) == FAILURE) {
/* reached end of iteration */
SET_OPCODE(op_array->opcodes+opline->op2.u.opline_num);
return 0; /* CHECK_ME */
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 3b58a6ff2b..96e994cc2f 100755
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -134,8 +134,8 @@ static void zend_user_it_dtor(zend_object_iterator *_iter TSRMLS_DC)
}
/* }}} */
-/* {{{ zend_user_it_has_more */
-static int zend_user_it_has_more(zend_object_iterator *_iter TSRMLS_DC)
+/* {{{ zend_user_it_valid */
+static int zend_user_it_valid(zend_object_iterator *_iter TSRMLS_DC)
{
if (_iter) {
zend_user_iterator *iter = (zend_user_iterator*)_iter;
@@ -143,7 +143,7 @@ static int zend_user_it_has_more(zend_object_iterator *_iter TSRMLS_DC)
zval *more;
int result;
- zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_has_more, "valid", &more);
+ zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_valid, "valid", &more);
if (more) {
result = i_zend_is_true(more);
zval_ptr_dtor(&more);
@@ -245,7 +245,7 @@ static void zend_user_it_rewind(zend_object_iterator *_iter TSRMLS_DC)
zend_object_iterator_funcs zend_interface_iterator_funcs_iterator = {
zend_user_it_dtor,
- zend_user_it_has_more,
+ zend_user_it_valid,
zend_user_it_get_current_data,
zend_user_it_get_current_key,
zend_user_it_move_forward,
@@ -339,7 +339,7 @@ static int zend_implement_iterator(zend_class_entry *interface, zend_class_entry
}
}
class_type->get_iterator = zend_user_it_get_iterator;
- class_type->iterator_funcs.zf_has_more = NULL;
+ class_type->iterator_funcs.zf_valid = NULL;
class_type->iterator_funcs.zf_current = NULL;
class_type->iterator_funcs.zf_key = NULL;
class_type->iterator_funcs.zf_next = NULL;
diff --git a/Zend/zend_iterators.h b/Zend/zend_iterators.h
index 9815ef72bb..8cf0435adc 100755
--- a/Zend/zend_iterators.h
+++ b/Zend/zend_iterators.h
@@ -32,8 +32,8 @@ typedef struct _zend_object_iterator_funcs {
/* release all resources associated with this iterator instance */
void (*dtor)(zend_object_iterator *iter TSRMLS_DC);
- /* check for end of iteration (FAILURE or SUCCESS for more data) */
- int (*has_more)(zend_object_iterator *iter TSRMLS_DC);
+ /* check for end of iteration (FAILURE or SUCCESS if data is valid) */
+ int (*valid)(zend_object_iterator *iter TSRMLS_DC);
/* fetch the item data for the current element */
void (*get_current_data)(zend_object_iterator *iter, zval ***data TSRMLS_DC);
@@ -60,7 +60,7 @@ typedef struct _zend_class_iterator_funcs {
zend_object_iterator_funcs *funcs;
zend_object_new_iterator_t new_iterator;
union _zend_function *zf_new_iterator;
- union _zend_function *zf_has_more;
+ union _zend_function *zf_valid;
union _zend_function *zf_current;
union _zend_function *zf_key;
union _zend_function *zf_next;