Lines Matching refs:intern
492 zend_internal_iterator *intern = emalloc(sizeof(zend_internal_iterator)); in zend_internal_iterator_create() local
493 zend_object_std_init(&intern->std, ce); in zend_internal_iterator_create()
494 intern->std.handlers = &zend_internal_iterator_handlers; in zend_internal_iterator_create()
495 intern->iter = NULL; in zend_internal_iterator_create()
496 intern->rewind_called = 0; in zend_internal_iterator_create()
497 return &intern->std; in zend_internal_iterator_create()
508 zend_internal_iterator *intern = in zend_create_internal_iterator_zval() local
510 intern->iter = iter; in zend_create_internal_iterator_zval()
511 intern->iter->index = 0; in zend_create_internal_iterator_zval()
512 ZVAL_OBJ(return_value, &intern->std); in zend_create_internal_iterator_zval()
517 zend_internal_iterator *intern = (zend_internal_iterator *) obj; in zend_internal_iterator_free() local
518 if (intern->iter) { in zend_internal_iterator_free()
519 zend_iterator_dtor(intern->iter); in zend_internal_iterator_free()
521 zend_object_std_dtor(&intern->std); in zend_internal_iterator_free()
525 zend_internal_iterator *intern = (zend_internal_iterator *) Z_OBJ_P(This); in zend_internal_iterator_fetch() local
526 if (!intern->iter) { in zend_internal_iterator_fetch()
530 return intern; in zend_internal_iterator_fetch()
534 static zend_result zend_internal_iterator_ensure_rewound(zend_internal_iterator *intern) { in zend_internal_iterator_ensure_rewound() argument
535 if (!intern->rewind_called) { in zend_internal_iterator_ensure_rewound()
536 zend_object_iterator *iter = intern->iter; in zend_internal_iterator_ensure_rewound()
537 intern->rewind_called = 1; in zend_internal_iterator_ensure_rewound()
556 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
557 if (!intern) { in ZEND_METHOD()
561 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
565 zval *data = intern->iter->funcs->get_current_data(intern->iter); in ZEND_METHOD()
574 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
575 if (!intern) { in ZEND_METHOD()
579 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
583 if (intern->iter->funcs->get_current_key) { in ZEND_METHOD()
584 intern->iter->funcs->get_current_key(intern->iter, return_value); in ZEND_METHOD()
586 RETURN_LONG(intern->iter->index); in ZEND_METHOD()
593 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
594 if (!intern) { in ZEND_METHOD()
598 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
603 intern->iter->index++; in ZEND_METHOD()
604 intern->iter->funcs->move_forward(intern->iter); in ZEND_METHOD()
610 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
611 if (!intern) { in ZEND_METHOD()
615 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
619 RETURN_BOOL(intern->iter->funcs->valid(intern->iter) == SUCCESS); in ZEND_METHOD()
625 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
626 if (!intern) { in ZEND_METHOD()
630 intern->rewind_called = 1; in ZEND_METHOD()
631 if (!intern->iter->funcs->rewind) { in ZEND_METHOD()
634 if (intern->iter->index != 0) { in ZEND_METHOD()
638 intern->iter->index = 0; in ZEND_METHOD()
642 intern->iter->funcs->rewind(intern->iter); in ZEND_METHOD()
643 intern->iter->index = 0; in ZEND_METHOD()