Lines Matching refs:intern

101 	zend_user_iterator     intern;  member
349 spl_dllist_object *intern = spl_dllist_from_obj(object); in spl_dllist_object_free_storage() local
352 zend_object_std_dtor(&intern->std); in spl_dllist_object_free_storage()
354 while (intern->llist->count > 0) { in spl_dllist_object_free_storage()
355 spl_ptr_llist_pop(intern->llist, &tmp); in spl_dllist_object_free_storage()
359 if (intern->gc_data != NULL) { in spl_dllist_object_free_storage()
360 efree(intern->gc_data); in spl_dllist_object_free_storage()
363 spl_ptr_llist_destroy(intern->llist); in spl_dllist_object_free_storage()
364 SPL_LLIST_CHECK_DELREF(intern->traverse_pointer); in spl_dllist_object_free_storage()
372 spl_dllist_object *intern; in spl_dllist_object_new_ex() local
376 intern = zend_object_alloc(sizeof(spl_dllist_object), parent); in spl_dllist_object_new_ex()
378 zend_object_std_init(&intern->std, class_type); in spl_dllist_object_new_ex()
379 object_properties_init(&intern->std, class_type); in spl_dllist_object_new_ex()
381 intern->flags = 0; in spl_dllist_object_new_ex()
382 intern->traverse_position = 0; in spl_dllist_object_new_ex()
386 intern->ce_get_iterator = other->ce_get_iterator; in spl_dllist_object_new_ex()
389 intern->llist = (spl_ptr_llist *)spl_ptr_llist_init(other->llist->ctor, other->llist->dtor); in spl_dllist_object_new_ex()
390 spl_ptr_llist_copy(other->llist, intern->llist); in spl_dllist_object_new_ex()
391 intern->traverse_pointer = intern->llist->head; in spl_dllist_object_new_ex()
392 SPL_LLIST_CHECK_ADDREF(intern->traverse_pointer); in spl_dllist_object_new_ex()
394 intern->llist = other->llist; in spl_dllist_object_new_ex()
395 intern->traverse_pointer = intern->llist->head; in spl_dllist_object_new_ex()
396 SPL_LLIST_CHECK_ADDREF(intern->traverse_pointer); in spl_dllist_object_new_ex()
399 intern->flags = other->flags; in spl_dllist_object_new_ex()
401intern->llist = (spl_ptr_llist *)spl_ptr_llist_init(spl_ptr_llist_zval_ctor, spl_ptr_llist_zval_dt… in spl_dllist_object_new_ex()
402 intern->traverse_pointer = intern->llist->head; in spl_dllist_object_new_ex()
403 SPL_LLIST_CHECK_ADDREF(intern->traverse_pointer); in spl_dllist_object_new_ex()
408 intern->flags |= (SPL_DLLIST_IT_FIX | SPL_DLLIST_IT_LIFO); in spl_dllist_object_new_ex()
409 intern->std.handlers = &spl_handler_SplDoublyLinkedList; in spl_dllist_object_new_ex()
411 intern->flags |= SPL_DLLIST_IT_FIX; in spl_dllist_object_new_ex()
412 intern->std.handlers = &spl_handler_SplDoublyLinkedList; in spl_dllist_object_new_ex()
416 intern->std.handlers = &spl_handler_SplDoublyLinkedList; in spl_dllist_object_new_ex()
428intern->fptr_offset_get = zend_hash_str_find_ptr(&class_type->function_table, "offsetget", sizeof(… in spl_dllist_object_new_ex()
429 if (intern->fptr_offset_get->common.scope == parent) { in spl_dllist_object_new_ex()
430 intern->fptr_offset_get = NULL; in spl_dllist_object_new_ex()
432intern->fptr_offset_set = zend_hash_str_find_ptr(&class_type->function_table, "offsetset", sizeof(… in spl_dllist_object_new_ex()
433 if (intern->fptr_offset_set->common.scope == parent) { in spl_dllist_object_new_ex()
434 intern->fptr_offset_set = NULL; in spl_dllist_object_new_ex()
436intern->fptr_offset_has = zend_hash_str_find_ptr(&class_type->function_table, "offsetexists", size… in spl_dllist_object_new_ex()
437 if (intern->fptr_offset_has->common.scope == parent) { in spl_dllist_object_new_ex()
438 intern->fptr_offset_has = NULL; in spl_dllist_object_new_ex()
440intern->fptr_offset_del = zend_hash_str_find_ptr(&class_type->function_table, "offsetunset", sizeo… in spl_dllist_object_new_ex()
441 if (intern->fptr_offset_del->common.scope == parent) { in spl_dllist_object_new_ex()
442 intern->fptr_offset_del = NULL; in spl_dllist_object_new_ex()
444intern->fptr_count = zend_hash_str_find_ptr(&class_type->function_table, "count", sizeof("count") … in spl_dllist_object_new_ex()
445 if (intern->fptr_count->common.scope == parent) { in spl_dllist_object_new_ex()
446 intern->fptr_count = NULL; in spl_dllist_object_new_ex()
450 return &intern->std; in spl_dllist_object_new_ex()
476 spl_dllist_object *intern = Z_SPLDLLIST_P(object); in spl_dllist_object_count_elements() local
478 if (intern->fptr_count) { in spl_dllist_object_count_elements()
480 zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); in spl_dllist_object_count_elements()
490 *count = spl_ptr_llist_count(intern->llist); in spl_dllist_object_count_elements()
497 spl_dllist_object *intern = Z_SPLDLLIST_P(obj); in spl_dllist_object_get_debug_info() local
498 spl_ptr_llist_element *current = intern->llist->head, *next; in spl_dllist_object_get_debug_info()
504 if (!intern->std.properties) { in spl_dllist_object_get_debug_info()
505 rebuild_object_properties(&intern->std); in spl_dllist_object_get_debug_info()
509 zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref); in spl_dllist_object_get_debug_info()
512 ZVAL_LONG(&tmp, intern->flags); in spl_dllist_object_get_debug_info()
540 spl_dllist_object *intern = Z_SPLDLLIST_P(obj); in spl_dllist_object_get_gc() local
541 spl_ptr_llist_element *current = intern->llist->head; in spl_dllist_object_get_gc()
544 if (intern->gc_data_count < intern->llist->count) { in spl_dllist_object_get_gc()
545 intern->gc_data_count = intern->llist->count; in spl_dllist_object_get_gc()
546 intern->gc_data = safe_erealloc(intern->gc_data, intern->gc_data_count, sizeof(zval), 0); in spl_dllist_object_get_gc()
550 ZVAL_COPY_VALUE(&intern->gc_data[i++], &current->data); in spl_dllist_object_get_gc()
554 *gc_data = intern->gc_data; in spl_dllist_object_get_gc()
565 spl_dllist_object *intern; in SPL_METHOD() local
571 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
572 spl_ptr_llist_push(intern->llist, value); in SPL_METHOD()
583 spl_dllist_object *intern; in SPL_METHOD() local
589 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
590 spl_ptr_llist_unshift(intern->llist, value); in SPL_METHOD()
600 spl_dllist_object *intern; in SPL_METHOD() local
606 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
607 spl_ptr_llist_pop(intern->llist, return_value); in SPL_METHOD()
620 spl_dllist_object *intern; in SPL_METHOD() local
626 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
627 spl_ptr_llist_shift(intern->llist, return_value); in SPL_METHOD()
641 spl_dllist_object *intern; in SPL_METHOD() local
647 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
648 value = spl_ptr_llist_last(intern->llist); in SPL_METHOD()
664 spl_dllist_object *intern; in SPL_METHOD() local
670 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
671 value = spl_ptr_llist_first(intern->llist); in SPL_METHOD()
687 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
693 count = spl_ptr_llist_count(intern->llist); in SPL_METHOD()
718 spl_dllist_object *intern; in SPL_METHOD() local
724 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
726 if (intern->flags & SPL_DLLIST_IT_FIX in SPL_METHOD()
727 && (intern->flags & SPL_DLLIST_IT_LIFO) != (value & SPL_DLLIST_IT_LIFO)) { in SPL_METHOD()
732 intern->flags = (value & SPL_DLLIST_IT_MASK) | (intern->flags & SPL_DLLIST_IT_FIX); in SPL_METHOD()
734 RETURN_LONG(intern->flags); in SPL_METHOD()
742 spl_dllist_object *intern; in SPL_METHOD() local
748 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
750 RETURN_LONG(intern->flags); in SPL_METHOD()
759 spl_dllist_object *intern; in SPL_METHOD() local
766 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
769 RETURN_BOOL(index >= 0 && index < intern->llist->count); in SPL_METHOD()
778 spl_dllist_object *intern; in SPL_METHOD() local
785 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
788 if (index < 0 || index >= intern->llist->count) { in SPL_METHOD()
793 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
809 spl_dllist_object *intern; in SPL_METHOD() local
815 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
819 spl_ptr_llist_push(intern->llist, value); in SPL_METHOD()
827 if (index < 0 || index >= intern->llist->count) { in SPL_METHOD()
832 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
836 if (intern->llist->dtor) { in SPL_METHOD()
837 intern->llist->dtor(element); in SPL_METHOD()
846 if (intern->llist->ctor) { in SPL_METHOD()
847 intern->llist->ctor(element); in SPL_METHOD()
863 spl_dllist_object *intern; in SPL_METHOD() local
871 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
873 llist = intern->llist; in SPL_METHOD()
875 if (index < 0 || index >= intern->llist->count) { in SPL_METHOD()
880 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
908 if (intern->traverse_pointer == element) { in SPL_METHOD()
910 intern->traverse_pointer = NULL; in SPL_METHOD()
929 zval_ptr_dtor(&iterator->intern.it.data); in spl_dllist_it_dtor()
1038 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1044 RETURN_LONG(intern->traverse_position); in SPL_METHOD()
1052 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1058 …spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->l… in SPL_METHOD()
1066 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1072 …spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->l… in SPL_METHOD()
1080 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1086 RETURN_BOOL(intern->traverse_pointer != NULL); in SPL_METHOD()
1094 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1100 …spl_dllist_it_helper_rewind(&intern->traverse_pointer, &intern->traverse_position, intern->llist, in SPL_METHOD()
1108 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1109 spl_ptr_llist_element *element = intern->traverse_pointer; in SPL_METHOD()
1129 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1131 spl_ptr_llist_element *current = intern->llist->head, *next; in SPL_METHOD()
1142 ZVAL_LONG(&flags, intern->flags); in SPL_METHOD()
1172 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1187 while (intern->llist->count > 0) { in SPL_METHOD()
1189 spl_ptr_llist_pop(intern->llist, &tmp); in SPL_METHOD()
1202 intern->flags = (int)Z_LVAL_P(flags); in SPL_METHOD()
1213 spl_ptr_llist_push(intern->llist, elem); in SPL_METHOD()
1233 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1234 spl_ptr_llist_element *current = intern->llist->head; in SPL_METHOD()
1244 ZVAL_LONG(&tmp, intern->flags); in SPL_METHOD()
1248 array_init_size(&tmp, intern->llist->count); in SPL_METHOD()
1264 spl_dllist_object *intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD() local
1283 intern->flags = (int) Z_LVAL_P(flags_zv); in SPL_METHOD()
1286 spl_ptr_llist_push(intern->llist, elem); in SPL_METHOD()
1289 object_properties_load(&intern->std, Z_ARRVAL_P(members_zv)); in SPL_METHOD()
1297 spl_dllist_object *intern; in SPL_METHOD() local
1305 intern = Z_SPLDLLIST_P(ZEND_THIS); in SPL_METHOD()
1308 if (index < 0 || index > intern->llist->count) { in SPL_METHOD()
1314 if (index == intern->llist->count) { in SPL_METHOD()
1316 spl_ptr_llist_push(intern->llist, value); in SPL_METHOD()
1322 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
1332 intern->llist->head = elem; in SPL_METHOD()
1338 intern->llist->count++; in SPL_METHOD()
1340 if (intern->llist->ctor) { in SPL_METHOD()
1341 intern->llist->ctor(elem); in SPL_METHOD()
1382 ZVAL_OBJ(&iterator->intern.it.data, Z_OBJ_P(object)); in spl_dllist_get_iterator()
1383 iterator->intern.it.funcs = &spl_dllist_it_funcs; in spl_dllist_get_iterator()
1384 iterator->intern.ce = ce; in spl_dllist_get_iterator()
1388 ZVAL_UNDEF(&iterator->intern.value); in spl_dllist_get_iterator()
1392 return &iterator->intern.it; in spl_dllist_get_iterator()