Lines Matching refs:intern

80 	zend_user_iterator  intern;  member
390 spl_heap_object *intern = spl_heap_from_obj(object); in spl_heap_object_free_storage() local
392 zend_object_std_dtor(&intern->std); in spl_heap_object_free_storage()
394 spl_ptr_heap_destroy(intern->heap); in spl_heap_object_free_storage()
400 spl_heap_object *intern; in spl_heap_object_new_ex() local
404 intern = zend_object_alloc(sizeof(spl_heap_object), parent); in spl_heap_object_new_ex()
406 zend_object_std_init(&intern->std, class_type); in spl_heap_object_new_ex()
407 object_properties_init(&intern->std, class_type); in spl_heap_object_new_ex()
411 intern->std.handlers = other->std.handlers; in spl_heap_object_new_ex()
412 intern->ce_get_iterator = other->ce_get_iterator; in spl_heap_object_new_ex()
415 intern->heap = spl_ptr_heap_clone(other->heap); in spl_heap_object_new_ex()
417 intern->heap = other->heap; in spl_heap_object_new_ex()
420 intern->flags = other->flags; in spl_heap_object_new_ex()
421 intern->fptr_cmp = other->fptr_cmp; in spl_heap_object_new_ex()
422 intern->fptr_count = other->fptr_count; in spl_heap_object_new_ex()
423 return &intern->std; in spl_heap_object_new_ex()
428intern->heap = spl_ptr_heap_init(spl_ptr_pqueue_elem_cmp, spl_ptr_heap_pqueue_elem_ctor, spl_ptr_h… in spl_heap_object_new_ex()
429 intern->std.handlers = &spl_handler_SplPriorityQueue; in spl_heap_object_new_ex()
430 intern->flags = SPL_PQUEUE_EXTR_DATA; in spl_heap_object_new_ex()
436 intern->heap = spl_ptr_heap_init( in spl_heap_object_new_ex()
439 intern->std.handlers = &spl_handler_SplHeap; in spl_heap_object_new_ex()
452intern->fptr_cmp = zend_hash_str_find_ptr(&class_type->function_table, "compare", sizeof("compare"… in spl_heap_object_new_ex()
453 if (intern->fptr_cmp->common.scope == parent) { in spl_heap_object_new_ex()
454 intern->fptr_cmp = NULL; in spl_heap_object_new_ex()
456intern->fptr_count = zend_hash_str_find_ptr(&class_type->function_table, "count", sizeof("count") … in spl_heap_object_new_ex()
457 if (intern->fptr_count->common.scope == parent) { in spl_heap_object_new_ex()
458 intern->fptr_count = NULL; in spl_heap_object_new_ex()
462 return &intern->std; in spl_heap_object_new_ex()
488 spl_heap_object *intern = Z_SPLHEAP_P(object); in spl_heap_object_count_elements() local
490 if (intern->fptr_count) { in spl_heap_object_count_elements()
492 zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv); in spl_heap_object_count_elements()
502 *count = spl_ptr_heap_count(intern->heap); in spl_heap_object_count_elements()
509 spl_heap_object *intern = Z_SPLHEAP_P(obj); in spl_heap_object_get_debug_info() local
515 if (!intern->std.properties) { in spl_heap_object_get_debug_info()
516 rebuild_object_properties(&intern->std); in spl_heap_object_get_debug_info()
519 debug_info = zend_new_array(zend_hash_num_elements(intern->std.properties) + 1); in spl_heap_object_get_debug_info()
520 zend_hash_copy(debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref); in spl_heap_object_get_debug_info()
523 ZVAL_LONG(&tmp, intern->flags); in spl_heap_object_get_debug_info()
528 ZVAL_BOOL(&tmp, intern->heap->flags&SPL_HEAP_CORRUPTED); in spl_heap_object_get_debug_info()
534 for (i = 0; i < intern->heap->count; ++i) { in spl_heap_object_get_debug_info()
536 spl_pqueue_elem *pq_elem = spl_heap_elem(intern->heap, i); in spl_heap_object_get_debug_info()
541 zval *elem = spl_heap_elem(intern->heap, i); in spl_heap_object_get_debug_info()
557 spl_heap_object *intern = Z_SPLHEAP_P(obj); in spl_heap_object_get_gc() local
558 *gc_data = (zval *) intern->heap->elements; in spl_heap_object_get_gc()
559 *gc_data_count = intern->heap->count; in spl_heap_object_get_gc()
567 spl_heap_object *intern = Z_SPLHEAP_P(obj); in spl_pqueue_object_get_gc() local
568 *gc_data = (zval *) intern->heap->elements; in spl_pqueue_object_get_gc()
570 *gc_data_count = 2 * intern->heap->count; in spl_pqueue_object_get_gc()
581 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
587 count = spl_ptr_heap_count(intern->heap); in SPL_METHOD()
596 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
602 RETURN_BOOL(spl_ptr_heap_count(intern->heap) == 0); in SPL_METHOD()
611 spl_heap_object *intern; in SPL_METHOD() local
617 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
619 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in SPL_METHOD()
625 spl_ptr_heap_insert(intern->heap, value, ZEND_THIS); in SPL_METHOD()
635 spl_heap_object *intern; in SPL_METHOD() local
641 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
643 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in SPL_METHOD()
648 if (spl_ptr_heap_delete_top(intern->heap, return_value, ZEND_THIS) == FAILURE) { in SPL_METHOD()
660 spl_heap_object *intern; in SPL_METHOD() local
667 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
669 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in SPL_METHOD()
677 spl_ptr_heap_insert(intern->heap, &elem, ZEND_THIS); in SPL_METHOD()
688 spl_heap_object *intern; in SPL_METHOD() local
694 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
696 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in SPL_METHOD()
701 if (spl_ptr_heap_delete_top(intern->heap, &elem, ZEND_THIS) == FAILURE) { in SPL_METHOD()
706 spl_pqueue_extract_helper(return_value, &elem, intern->flags); in SPL_METHOD()
715 spl_heap_object *intern; in SPL_METHOD() local
722 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
724 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in SPL_METHOD()
729 elem = spl_ptr_heap_top(intern->heap); in SPL_METHOD()
736 spl_pqueue_extract_helper(return_value, elem, intern->flags); in SPL_METHOD()
746 spl_heap_object *intern; in SPL_METHOD() local
758 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
759 intern->flags = value; in SPL_METHOD()
760 RETURN_LONG(intern->flags); in SPL_METHOD()
768 spl_heap_object *intern; in SPL_METHOD() local
774 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
776 RETURN_LONG(intern->flags); in SPL_METHOD()
784 spl_heap_object *intern; in SPL_METHOD() local
790 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
792 intern->heap->flags = intern->heap->flags & ~SPL_HEAP_CORRUPTED; in SPL_METHOD()
802 spl_heap_object *intern; in SPL_METHOD() local
808 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
810 RETURN_BOOL(intern->heap->flags & SPL_HEAP_CORRUPTED); in SPL_METHOD()
833 spl_heap_object *intern; in SPL_METHOD() local
839 intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD()
841 if (intern->heap->flags & SPL_HEAP_CORRUPTED) { in SPL_METHOD()
846 value = spl_ptr_heap_top(intern->heap); in SPL_METHOD()
890 zval_ptr_dtor(&iterator->intern.it.data); in spl_heap_it_dtor()
971 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
977 RETURN_LONG(intern->heap->count - 1); in SPL_METHOD()
985 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
991 spl_ptr_heap_delete_top(intern->heap, NULL, ZEND_THIS); in SPL_METHOD()
999 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
1005 RETURN_BOOL(intern->heap->count != 0); in SPL_METHOD()
1024 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
1030 if (!intern->heap->count) { in SPL_METHOD()
1033 zval *element = spl_heap_elem(intern->heap, 0); in SPL_METHOD()
1043 spl_heap_object *intern = Z_SPLHEAP_P(ZEND_THIS); in SPL_METHOD() local
1049 if (!intern->heap->count) { in SPL_METHOD()
1052 spl_pqueue_elem *elem = spl_heap_elem(intern->heap, 0); in SPL_METHOD()
1053 spl_pqueue_extract_helper(return_value, elem, intern->flags); in SPL_METHOD()
1111 zend_iterator_init(&iterator->intern.it); in spl_heap_get_iterator()
1114 ZVAL_OBJ(&iterator->intern.it.data, Z_OBJ_P(object)); in spl_heap_get_iterator()
1115 iterator->intern.it.funcs = &spl_heap_it_funcs; in spl_heap_get_iterator()
1116 iterator->intern.ce = ce; in spl_heap_get_iterator()
1118 ZVAL_UNDEF(&iterator->intern.value); in spl_heap_get_iterator()
1120 return &iterator->intern.it; in spl_heap_get_iterator()
1139 ZVAL_OBJ(&iterator->intern.it.data, Z_OBJ_P(object)); in spl_pqueue_get_iterator()
1140 iterator->intern.it.funcs = &spl_pqueue_it_funcs; in spl_pqueue_get_iterator()
1141 iterator->intern.ce = ce; in spl_pqueue_get_iterator()
1144 ZVAL_UNDEF(&iterator->intern.value); in spl_pqueue_get_iterator()
1146 return &iterator->intern.it; in spl_pqueue_get_iterator()