Lines Matching refs:intern
497 zend_internal_iterator *intern = emalloc(sizeof(zend_internal_iterator)); in zend_internal_iterator_create() local
498 zend_object_std_init(&intern->std, ce); in zend_internal_iterator_create()
499 intern->iter = NULL; in zend_internal_iterator_create()
500 intern->rewind_called = 0; in zend_internal_iterator_create()
501 return &intern->std; in zend_internal_iterator_create()
512 zend_internal_iterator *intern = in zend_create_internal_iterator_zval() local
514 intern->iter = iter; in zend_create_internal_iterator_zval()
515 intern->iter->index = 0; in zend_create_internal_iterator_zval()
516 ZVAL_OBJ(return_value, &intern->std); in zend_create_internal_iterator_zval()
521 zend_internal_iterator *intern = (zend_internal_iterator *) obj; in zend_internal_iterator_free() local
522 if (intern->iter) { in zend_internal_iterator_free()
523 zend_iterator_dtor(intern->iter); in zend_internal_iterator_free()
525 zend_object_std_dtor(&intern->std); in zend_internal_iterator_free()
529 zend_internal_iterator *intern = (zend_internal_iterator *) Z_OBJ_P(This); in zend_internal_iterator_fetch() local
530 if (!intern->iter) { in zend_internal_iterator_fetch()
534 return intern; in zend_internal_iterator_fetch()
538 static zend_result zend_internal_iterator_ensure_rewound(zend_internal_iterator *intern) { in zend_internal_iterator_ensure_rewound() argument
539 if (!intern->rewind_called) { in zend_internal_iterator_ensure_rewound()
540 zend_object_iterator *iter = intern->iter; in zend_internal_iterator_ensure_rewound()
541 intern->rewind_called = 1; in zend_internal_iterator_ensure_rewound()
560 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
561 if (!intern) { in ZEND_METHOD()
565 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
569 zval *data = intern->iter->funcs->get_current_data(intern->iter); in ZEND_METHOD()
578 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
579 if (!intern) { in ZEND_METHOD()
583 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
587 if (intern->iter->funcs->get_current_key) { in ZEND_METHOD()
588 intern->iter->funcs->get_current_key(intern->iter, return_value); in ZEND_METHOD()
590 RETURN_LONG(intern->iter->index); in ZEND_METHOD()
597 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
598 if (!intern) { in ZEND_METHOD()
602 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
607 intern->iter->index++; in ZEND_METHOD()
608 intern->iter->funcs->move_forward(intern->iter); in ZEND_METHOD()
614 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
615 if (!intern) { in ZEND_METHOD()
619 if (zend_internal_iterator_ensure_rewound(intern) == FAILURE) { in ZEND_METHOD()
623 RETURN_BOOL(intern->iter->funcs->valid(intern->iter) == SUCCESS); in ZEND_METHOD()
629 zend_internal_iterator *intern = zend_internal_iterator_fetch(ZEND_THIS); in ZEND_METHOD() local
630 if (!intern) { in ZEND_METHOD()
634 intern->rewind_called = 1; in ZEND_METHOD()
635 if (!intern->iter->funcs->rewind) { in ZEND_METHOD()
638 if (intern->iter->index != 0) { in ZEND_METHOD()
642 intern->iter->index = 0; in ZEND_METHOD()
646 intern->iter->funcs->rewind(intern->iter); in ZEND_METHOD()
647 intern->iter->index = 0; in ZEND_METHOD()