Lines Matching refs:stack
11 ds_stack_t *stack = ecalloc(1, sizeof(ds_stack_t)); in ds_stack_ex() local
12 stack->vector = vector; in ds_stack_ex()
13 return stack; in ds_stack_ex()
21 ds_stack_t *ds_stack_clone(ds_stack_t *stack) in ds_stack_clone() argument
23 return ds_stack_ex(ds_vector_clone(stack->vector)); in ds_stack_clone()
26 void ds_stack_free(ds_stack_t *stack) in ds_stack_free() argument
28 ds_vector_free(stack->vector); in ds_stack_free()
29 efree(stack); in ds_stack_free()
32 void ds_stack_allocate(ds_stack_t *stack, zend_long capacity) in ds_stack_allocate() argument
34 ds_vector_allocate(stack->vector, capacity); in ds_stack_allocate()
37 void ds_stack_push_va(ds_stack_t *stack, VA_PARAMS) in ds_stack_push_va() argument
39 ds_vector_push_va(stack->vector, argc, argv); in ds_stack_push_va()
42 void ds_stack_push(ds_stack_t *stack, zval *value) in ds_stack_push() argument
44 ds_vector_push(stack->vector, value); in ds_stack_push()
47 void ds_stack_clear(ds_stack_t *stack) in ds_stack_clear() argument
49 ds_vector_clear(stack->vector); in ds_stack_clear()
52 void ds_stack_push_all(ds_stack_t *stack, zval *value) in ds_stack_push_all() argument
54 ds_vector_push_all(stack->vector, value); in ds_stack_push_all()
57 void ds_stack_to_array(ds_stack_t *stack, zval *return_value) in ds_stack_to_array() argument
59 zend_long size = DS_STACK_SIZE(stack); in ds_stack_to_array()
68 DS_VECTOR_FOREACH_REVERSED(stack->vector, value) { in ds_stack_to_array()
76 void ds_stack_pop_throw(ds_stack_t *stack, zval *return_value) in ds_stack_pop_throw() argument
78 ds_vector_pop_throw(stack->vector, return_value); in ds_stack_pop_throw()
81 void ds_stack_pop(ds_stack_t *stack, zval *return_value) in ds_stack_pop() argument
83 ds_vector_pop(stack->vector, return_value); in ds_stack_pop()
86 zval *ds_stack_peek(ds_stack_t *stack) in ds_stack_peek() argument
88 return ds_vector_get_last(stack->vector); in ds_stack_peek()
91 zval *ds_stack_peek_throw(ds_stack_t *stack) in ds_stack_peek_throw() argument
93 return ds_vector_get_last_throw(stack->vector); in ds_stack_peek_throw()