Lines Matching refs:elem

99 static void spl_ptr_heap_zval_dtor(void *elem) { /* {{{ */  in spl_ptr_heap_zval_dtor()  argument
100 zval_ptr_dtor((zval *) elem); in spl_ptr_heap_zval_dtor()
104 static void spl_ptr_heap_zval_ctor(void *elem) { /* {{{ */ in spl_ptr_heap_zval_ctor() argument
105 Z_TRY_ADDREF_P((zval *) elem); in spl_ptr_heap_zval_ctor()
109 static void spl_ptr_heap_pqueue_elem_dtor(void *elem) { /* {{{ */ in spl_ptr_heap_pqueue_elem_dtor() argument
110 spl_pqueue_elem *pq_elem = elem; in spl_ptr_heap_pqueue_elem_dtor()
116 static void spl_ptr_heap_pqueue_elem_ctor(void *elem) { /* {{{ */ in spl_ptr_heap_pqueue_elem_ctor() argument
117 spl_pqueue_elem *pq_elem = elem; in spl_ptr_heap_pqueue_elem_ctor()
139 static void spl_pqueue_extract_helper(zval *result, spl_pqueue_elem *elem, int flags) /* {{{ */ in spl_pqueue_extract_helper() argument
143 Z_TRY_ADDREF(elem->data); in spl_pqueue_extract_helper()
144 add_assoc_zval_ex(result, "data", sizeof("data") - 1, &elem->data); in spl_pqueue_extract_helper()
145 Z_TRY_ADDREF(elem->priority); in spl_pqueue_extract_helper()
146 add_assoc_zval_ex(result, "priority", sizeof("priority") - 1, &elem->priority); in spl_pqueue_extract_helper()
151 ZVAL_COPY(result, &elem->data); in spl_pqueue_extract_helper()
156 ZVAL_COPY(result, &elem->priority); in spl_pqueue_extract_helper()
269 static void spl_ptr_heap_insert(spl_ptr_heap *heap, void *elem, void *cmp_userdata) { /* {{{ */ in spl_ptr_heap_insert() argument
283 …for (i = heap->count; i > 0 && heap->cmp(spl_heap_elem(heap, (i-1)/2), elem, cmp_userdata) < 0; i … in spl_ptr_heap_insert()
295 spl_heap_elem_copy(heap, spl_heap_elem(heap, i), elem); in spl_ptr_heap_insert()
308 static zend_result spl_ptr_heap_delete_top(spl_ptr_heap *heap, void *elem, void *cmp_userdata) { /*… in spl_ptr_heap_delete_top() argument
319 if (elem) { in spl_ptr_heap_delete_top()
320 spl_heap_elem_copy(heap, elem, spl_heap_elem(heap, 0)); in spl_ptr_heap_delete_top()
540 zval elem; in spl_heap_object_get_debug_info() local
541 spl_pqueue_extract_helper(&elem, pq_elem, SPL_PQUEUE_EXTR_BOTH); in spl_heap_object_get_debug_info()
542 add_index_zval(&heap_array, i, &elem); in spl_heap_object_get_debug_info()
544 zval *elem = spl_heap_elem(intern->heap, i); in spl_heap_object_get_debug_info() local
545 add_index_zval(&heap_array, i, elem); in spl_heap_object_get_debug_info()
546 Z_TRY_ADDREF_P(elem); in spl_heap_object_get_debug_info()
670 spl_pqueue_elem elem; in PHP_METHOD() local
683 ZVAL_COPY(&elem.data, data); in PHP_METHOD()
684 ZVAL_COPY(&elem.priority, priority); in PHP_METHOD()
689 int type = Z_TYPE(elem.priority); in PHP_METHOD()
701 spl_ptr_heap_insert(intern->heap, &elem, ZEND_THIS); in PHP_METHOD()
710 spl_pqueue_elem elem; in PHP_METHOD() local
723 if (spl_ptr_heap_delete_top(intern->heap, &elem, ZEND_THIS) == FAILURE) { in PHP_METHOD()
728 spl_pqueue_extract_helper(return_value, &elem, intern->flags); in PHP_METHOD()
729 spl_ptr_heap_pqueue_elem_dtor(&elem); in PHP_METHOD()
737 spl_pqueue_elem *elem; in PHP_METHOD() local
749 elem = spl_ptr_heap_top(intern->heap); in PHP_METHOD()
751 if (!elem) { in PHP_METHOD()
756 spl_pqueue_extract_helper(return_value, elem, intern->flags); in PHP_METHOD()
945 spl_pqueue_elem *elem = spl_heap_elem(object->heap, 0); in spl_pqueue_it_get_current_data() local
946 spl_pqueue_extract_helper(&user_it->value, elem, object->flags); in spl_pqueue_it_get_current_data()
1052 spl_pqueue_elem *elem = spl_heap_elem(intern->heap, 0); in PHP_METHOD() local
1053 spl_pqueue_extract_helper(return_value, elem, intern->flags); in PHP_METHOD()