Lines Matching refs:intern

103 	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 = ecalloc(1, sizeof(spl_dllist_object) + zend_object_properties_size(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()
505 if (!intern->std.properties) { in spl_dllist_object_get_debug_info()
506 rebuild_object_properties(&intern->std); in spl_dllist_object_get_debug_info()
511 zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref); in spl_dllist_object_get_debug_info()
514 ZVAL_LONG(&tmp, intern->flags); in spl_dllist_object_get_debug_info()
542 spl_dllist_object *intern = Z_SPLDLLIST_P(obj); in spl_dllist_object_get_gc() local
543 spl_ptr_llist_element *current = intern->llist->head; in spl_dllist_object_get_gc()
546 if (intern->gc_data_count < intern->llist->count) { in spl_dllist_object_get_gc()
547 intern->gc_data_count = intern->llist->count; in spl_dllist_object_get_gc()
548 intern->gc_data = safe_erealloc(intern->gc_data, intern->gc_data_count, sizeof(zval), 0); in spl_dllist_object_get_gc()
552 ZVAL_COPY_VALUE(&intern->gc_data[i++], &current->data); in spl_dllist_object_get_gc()
556 *gc_data = intern->gc_data; in spl_dllist_object_get_gc()
567 spl_dllist_object *intern; in SPL_METHOD() local
573 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
574 spl_ptr_llist_push(intern->llist, value); in SPL_METHOD()
585 spl_dllist_object *intern; in SPL_METHOD() local
591 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
592 spl_ptr_llist_unshift(intern->llist, value); in SPL_METHOD()
602 spl_dllist_object *intern; in SPL_METHOD() local
608 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
609 spl_ptr_llist_pop(intern->llist, return_value); in SPL_METHOD()
622 spl_dllist_object *intern; in SPL_METHOD() local
628 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
629 spl_ptr_llist_shift(intern->llist, return_value); in SPL_METHOD()
643 spl_dllist_object *intern; in SPL_METHOD() local
649 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
650 value = spl_ptr_llist_last(intern->llist); in SPL_METHOD()
667 spl_dllist_object *intern; in SPL_METHOD() local
673 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
674 value = spl_ptr_llist_first(intern->llist); in SPL_METHOD()
691 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
697 count = spl_ptr_llist_count(intern->llist); in SPL_METHOD()
722 spl_dllist_object *intern; in SPL_METHOD() local
728 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
730 if (intern->flags & SPL_DLLIST_IT_FIX in SPL_METHOD()
731 && (intern->flags & SPL_DLLIST_IT_LIFO) != (value & SPL_DLLIST_IT_LIFO)) { in SPL_METHOD()
736 intern->flags = (value & SPL_DLLIST_IT_MASK) | (intern->flags & SPL_DLLIST_IT_FIX); in SPL_METHOD()
738 RETURN_LONG(intern->flags); in SPL_METHOD()
746 spl_dllist_object *intern; in SPL_METHOD() local
752 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
754 RETURN_LONG(intern->flags); in SPL_METHOD()
763 spl_dllist_object *intern; in SPL_METHOD() local
770 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
773 RETURN_BOOL(index >= 0 && index < intern->llist->count); in SPL_METHOD()
782 spl_dllist_object *intern; in SPL_METHOD() local
789 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
792 if (index < 0 || index >= intern->llist->count) { in SPL_METHOD()
797 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
814 spl_dllist_object *intern; in SPL_METHOD() local
820 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
824 spl_ptr_llist_push(intern->llist, value); in SPL_METHOD()
832 if (index < 0 || index >= intern->llist->count) { in SPL_METHOD()
837 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
841 if (intern->llist->dtor) { in SPL_METHOD()
842 intern->llist->dtor(element); in SPL_METHOD()
851 if (intern->llist->ctor) { in SPL_METHOD()
852 intern->llist->ctor(element); in SPL_METHOD()
868 spl_dllist_object *intern; in SPL_METHOD() local
876 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
878 llist = intern->llist; in SPL_METHOD()
880 if (index < 0 || index >= intern->llist->count) { in SPL_METHOD()
885 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
913 if (intern->traverse_pointer == element) { in SPL_METHOD()
915 intern->traverse_pointer = NULL; in SPL_METHOD()
934 zval_ptr_dtor(&iterator->intern.it.data); in spl_dllist_it_dtor()
1043 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1049 RETURN_LONG(intern->traverse_position); in SPL_METHOD()
1057 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1063 …spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->l… in SPL_METHOD()
1071 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1077 …spl_dllist_it_helper_move_forward(&intern->traverse_pointer, &intern->traverse_position, intern->l… in SPL_METHOD()
1085 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1091 RETURN_BOOL(intern->traverse_pointer != NULL); in SPL_METHOD()
1099 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1105 …spl_dllist_it_helper_rewind(&intern->traverse_pointer, &intern->traverse_position, intern->llist, in SPL_METHOD()
1113 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1114 spl_ptr_llist_element *element = intern->traverse_pointer; in SPL_METHOD()
1135 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1137 spl_ptr_llist_element *current = intern->llist->head, *next; in SPL_METHOD()
1148 ZVAL_LONG(&flags, intern->flags); in SPL_METHOD()
1179 spl_dllist_object *intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD() local
1203 intern->flags = (int)Z_LVAL_P(flags); in SPL_METHOD()
1214 spl_ptr_llist_push(intern->llist, elem); in SPL_METHOD()
1236 spl_dllist_object *intern; in SPL_METHOD() local
1244 intern = Z_SPLDLLIST_P(getThis()); in SPL_METHOD()
1247 if (index < 0 || index > intern->llist->count) { in SPL_METHOD()
1255 if (index == intern->llist->count) { in SPL_METHOD()
1257 spl_ptr_llist_push(intern->llist, value); in SPL_METHOD()
1263 element = spl_ptr_llist_offset(intern->llist, index, intern->flags & SPL_DLLIST_IT_LIFO); in SPL_METHOD()
1273 intern->llist->head = elem; in SPL_METHOD()
1279 intern->llist->count++; in SPL_METHOD()
1281 if (intern->llist->ctor) { in SPL_METHOD()
1282 intern->llist->ctor(elem); in SPL_METHOD()
1312 ZVAL_COPY(&iterator->intern.it.data, object); in spl_dllist_get_iterator()
1313 iterator->intern.it.funcs = &spl_dllist_it_funcs; in spl_dllist_get_iterator()
1314 iterator->intern.ce = ce; in spl_dllist_get_iterator()
1318 ZVAL_UNDEF(&iterator->intern.value); in spl_dllist_get_iterator()
1322 return &iterator->intern.it; in spl_dllist_get_iterator()