Lines Matching refs:buffer

35     memmove(&deque->buffer[dst], &deque->buffer[src], length * sizeof(zval));  in ds_deque_memmove()
47 deque->buffer = ds_allocate_zval_buffer(DS_DEQUE_MIN_CAPACITY); in ds_deque()
61 deque->buffer = ds_allocate_zval_buffer(deque->capacity); in ds_deque_preallocated()
69 static ds_deque_t *ds_deque_from_buffer(zval *buffer, zend_long capacity, zend_long size) in ds_deque_from_buffer() argument
73 deque->buffer = buffer; in ds_deque_from_buffer()
85 zval *buffer = ds_allocate_zval_buffer(deque->capacity); in ds_deque_clone() local
86 zval *target = buffer; in ds_deque_clone()
94 return ds_deque_from_buffer(buffer, deque->capacity, deque->size); in ds_deque_clone()
132 zval *buffer = ds_allocate_zval_buffer(deque->capacity); in ds_deque_reset_head() local
134 memcpy(&buffer[0], &deque->buffer[h], r * sizeof(zval)); in ds_deque_reset_head()
135 memcpy(&buffer[r], &deque->buffer[0], t * sizeof(zval)); in ds_deque_reset_head()
137 FREE_AND_REPLACE(deque->buffer, buffer); in ds_deque_reset_head()
149 …deque->buffer = ds_reallocate_zval_buffer(deque->buffer, capacity, deque->capacity, deque->size); in ds_deque_reallocate()
192 …deque->buffer = ds_reallocate_zval_buffer(deque->buffer, DS_DEQUE_MIN_CAPACITY, deque->capacity,… in ds_deque_clear()
208 efree(deque->buffer); in ds_deque_free()
225 return deque->buffer + ds_deque_lookup_index(deque, index); in ds_deque_lookup()
250 deque->buffer + deque->head, in ds_deque_reverse()
251 deque->buffer + deque->tail in ds_deque_reverse()
262 deque->buffer[head], in ds_deque_reverse()
263 deque->buffer[tail] in ds_deque_reverse()
288 SET_AS_RETURN_AND_UNDEF(&deque->buffer[deque->head]); in ds_deque_shift()
308 SET_AS_RETURN_AND_UNDEF(&deque->buffer[deque->tail]); in ds_deque_pop()
346 SET_AS_RETURN_AND_UNDEF(&deque->buffer[index]); in ds_deque_remove()
373 ZVAL_COPY(&deque->buffer[deque->head], &argv[argc]); in ds_deque_unshift_va()
383 ZVAL_COPY(&deque->buffer[deque->tail], value); in ds_deque_push()
393 ZVAL_COPY(&deque->buffer[deque->tail], argv); in ds_deque_push_va()
456 dst = &deque->buffer[index]; in ds_deque_insert_va()
463 dst = &deque->buffer[index - argc]; in ds_deque_insert_va()
482 if (zend_is_identical(value, &deque->buffer[head & mask])) { in ds_deque_find_index()
496 ds_join_zval_buffer(deque->buffer, deque->size, str, len) in ds_deque_join()
536 SWAP_ZVAL(deque->buffer[deque->tail], deque->buffer[deque->head]); in ds_deque_rotate()
542 SWAP_ZVAL(deque->buffer[deque->tail], deque->buffer[deque->head]); in ds_deque_rotate()
585 return &deque->buffer[(deque->tail - 1) & (deque->capacity - 1)]; in ds_deque_get_last()
600 return &deque->buffer[deque->head]; in ds_deque_get_first()
667 ds_user_sort_zval_buffer(deque->buffer, deque->size); in ds_deque_sort_callback()
673 ds_sort_zval_buffer(deque->buffer, deque->size); in ds_deque_sort()
701 zval *buffer = ds_allocate_zval_buffer(deque->capacity); in ds_deque_map() local
702 zval *target = buffer; in ds_deque_map()
713 while (target > buffer) { in ds_deque_map()
718 efree(buffer); in ds_deque_map()
727 return ds_deque_from_buffer(buffer, deque->capacity, deque->size); in ds_deque_map()