Home
last modified time | relevance | path

Searched refs:stack (Results 1 – 25 of 81) sorted by relevance

1234

/PHP-5.5/Zend/
H A Dzend_ptr_stack.h47 if (stack->top+count > stack->max) { \ in END_EXTERN_C()
51 } while (stack->top+count > stack->max); \ in END_EXTERN_C()
52stack->elements = (void **) perealloc(stack->elements, (sizeof(void *) * (stack->max)), stack->per… in END_EXTERN_C()
53 stack->top_element = stack->elements+stack->top; \ in END_EXTERN_C()
65 *(stack->top_element++) = a;
66 *(stack->top_element++) = b;
90 stack->top -= 3; in zend_ptr_stack_3_pop()
97 stack->top -= 2; in zend_ptr_stack_2_pop()
104 stack->top++; in zend_ptr_stack_push()
110 stack->top--; in zend_ptr_stack_pop()
[all …]
H A Dzend_stack.c27 stack->top = 0; in zend_stack_init()
28 stack->max = 0; in zend_stack_init()
35 if (stack->top >= stack->max) { /* we need to allocate more memory */ in zend_stack_push()
36 stack->elements = (void **) erealloc(stack->elements, in zend_stack_push()
42 stack->elements[stack->top] = (void *) emalloc(size); in zend_stack_push()
43 memcpy(stack->elements[stack->top], element, size); in zend_stack_push()
44 return stack->top++; in zend_stack_push()
50 if (stack->top > 0) { in zend_stack_top()
51 *element = stack->elements[stack->top - 1]; in zend_stack_top()
63 efree(stack->elements[--stack->top]); in zend_stack_del_top()
[all …]
H A Dzend_ptr_stack.c30 stack->top_element = stack->elements = NULL; in zend_ptr_stack_init_ex()
31 stack->top = stack->max = 0; in zend_ptr_stack_init_ex()
51 stack->top++; in zend_ptr_stack_n_push()
68 stack->top--; in zend_ptr_stack_n_pop()
79 pefree(stack->elements, stack->persistent); in zend_ptr_stack_destroy()
86 int i = stack->top; in zend_ptr_stack_apply()
98 int i = stack->top; in zend_ptr_stack_clean()
101 pefree(stack->elements[i], stack->persistent); in zend_ptr_stack_clean()
104 stack->top = 0; in zend_ptr_stack_clean()
105 stack->top_element = stack->elements; in zend_ptr_stack_clean()
[all …]
H A Dzend_stack.h34 ZEND_API int zend_stack_init(zend_stack *stack);
35 ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size);
36 ZEND_API int zend_stack_top(const zend_stack *stack, void **element);
37 ZEND_API int zend_stack_del_top(zend_stack *stack);
38 ZEND_API int zend_stack_int_top(const zend_stack *stack);
39 ZEND_API int zend_stack_is_empty(const zend_stack *stack);
40 ZEND_API int zend_stack_destroy(zend_stack *stack);
41 ZEND_API void **zend_stack_base(const zend_stack *stack);
42 ZEND_API int zend_stack_count(const zend_stack *stack);
43 ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
[all …]
H A Dzend_execute.h165 #define ZEND_VM_STACK_ELEMETS(stack) \ argument
166 ((void**)(((char*)(stack)) + ZEND_MM_ALIGNED_SIZE(sizeof(struct _zend_vm_stack))))
192 zend_vm_stack stack = EG(argument_stack); in zend_vm_stack_destroy() local
194 while (stack != NULL) { in zend_vm_stack_destroy()
195 zend_vm_stack p = stack->prev; in zend_vm_stack_destroy()
196 efree(stack); in zend_vm_stack_destroy()
197 stack = p; in zend_vm_stack_destroy()
/PHP-5.5/ext/spl/tests/
H A Ddllist_004.phpt5 $stack = new SplStack();
8 $stack->pop();
13 $stack->shift();
20 $stack->push($a);
21 echo $stack->pop()."\n";
24 $stack->push(1);
25 $stack->push(2);
26 echo $stack->top()."\n";
34 $stack->push(NULL);
35 $stack->push(NULL);
[all …]
H A DSplStack_setIteratorMode.phpt7 $stack = new SplStack();
9 $stack->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
/PHP-5.5/ext/pcre/pcrelib/sljit/
H A DsljitUtils.c237 if (!stack) in sljit_allocate_stack()
246 stack->base = base.uw; in sljit_allocate_stack()
247 stack->limit = stack->base; in sljit_allocate_stack()
248 stack->max_limit = stack->base + max_limit; in sljit_allocate_stack()
249 if (sljit_stack_resize(stack, stack->base + limit)) { in sljit_allocate_stack()
270 stack->limit = stack->base + limit; in sljit_allocate_stack()
271 stack->max_limit = stack->base + max_limit; in sljit_allocate_stack()
273 stack->top = stack->base; in sljit_allocate_stack()
274 return stack; in sljit_allocate_stack()
285 munmap((void*)stack->base, stack->max_limit - stack->base); in sljit_free_stack()
[all …]
/PHP-5.5/ext/wddx/
H A Dwddx.c177 stack->top = 0; in wddx_stack_init()
181 stack->done = 0; in wddx_stack_init()
191 if (stack->top >= stack->max) { /* we need to allocate more memory */ in wddx_stack_push()
192 stack->elements = (void **) erealloc(stack->elements, in wddx_stack_push()
195 stack->elements[stack->top] = (void *) emalloc(size); in wddx_stack_push()
196 memcpy(stack->elements[stack->top], element, size); in wddx_stack_push()
206 *element = stack->elements[stack->top - 1]; in wddx_stack_top()
941 stack->top--; in php_wddx_pop_element()
976 stack->top--; in php_wddx_pop_element()
1050 stack->top--; in php_wddx_pop_element()
[all …]
/PHP-5.5/ext/standard/tests/array/
H A Darray_shift_variation7.phpt5 /* Prototype : mixed array_shift(array &$stack)
16 $stack = array ('one' => 'un', 'two' => 'deux');
19 var_dump($result = array_shift($stack));
22 echo key($stack) . " => " . current ($stack) . "\n";
H A Darray_push_variation5.phpt5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
16 $stack = array ('one' => 'un', 'two' => 'deux');
20 var_dump($result = array_push($stack, $var0));
23 echo key($stack) . " => " . current ($stack) . "\n";
H A Darray_shift_variation5.phpt5 /* Prototype : mixed array_shift(array &$stack)
12 * as the $stack argument of another call to array_shift()
18 $stack = array ( array ( array ('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
22 var_dump(array_shift(array_shift(array_shift($stack))));
24 $stack = array (array( array('zero', 'one', 'two'), 'un', 'deux'), 'eins', 'zwei');
27 $result1 = array_shift($stack);
H A Darray_push_variation3.phpt5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
13 * 2. as sub-array as $stack arg
24 echo "\n-- Pass sub-array as \$stack argument --\n";
51 -- Pass sub-array as $stack argument --
H A Darray_push_error1.phpt5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
18 $stack = array(1, 2);
19 var_dump( array_push($stack) );
H A Darray_shift_error.phpt5 /* Prototype : mixed array_shift(array &$stack)
22 $stack = array(1, 2);
24 var_dump( array_shift($stack, $extra_arg) );
H A Darray_push_variation2.phpt5 /* Prototype : int array_push(array $stack, mixed $var [, mixed $...])
17 $stack = array (1, 2);
92 $temp_array = $stack;
/PHP-5.5/tests/lang/
H A DpassByReference_012.phpt10 $stack = array ( array ( 'two' ));
11 var_dump(array_shift(array_shift($stack)));
15 $stack = $original;
16 var_dump(array_shift(array_shift($stack)));
H A D012.phpt2 Testing stack after early function return
/PHP-5.5/sapi/apache_hooks/
H A Dmod_php5.c117 stack->top = 0; in sapi_stack_init_ex()
118 stack->persistent = persistent; in sapi_stack_init_ex()
120 if (!stack->elements) { in sapi_stack_init_ex()
129 if (stack->top >= stack->max) { /* we need to allocate more memory */ in sapi_stack_push()
130 stack->elements = (void **) perealloc(stack->elements, in sapi_stack_push()
131 (sizeof(void **) * (stack->max += STACK_BLOCK_SIZE)), stack->persistent); in sapi_stack_push()
132 if (!stack->elements) { in sapi_stack_push()
136 stack->elements[stack->top] = (void *) element; in sapi_stack_push()
137 return stack->top++; in sapi_stack_push()
140 if(stack->top == 0) { in sapi_stack_pop()
[all …]
/PHP-5.5/Zend/tests/
H A Dbug36214.phpt8 public $stack = array();
11 $this->stack[$name] = $var;return;
15 return $this->stack[$name];
/PHP-5.5/ext/spl/internal/
H A Dsplstack.inc13 * @brief Implementation of a stack through a DoublyLinkedList. As SplStack
15 * though they don't make much sense for a stack.
19 * stack implemented using a doubly linked list (DLL).
34 * @note The iteration's direction is not modifiable for stack instances
/PHP-5.5/sapi/cli/
H A Dconfig.w3214 ADD_FLAG("LDFLAGS_CLI", "/stack:8388608");
19 ADD_FLAG("LDFLAGS_CLI_WIN32", "/stack:8388608");
/PHP-5.5/ext/pdo_mysql/tests/
H A Dpdo_mysql_subclass.phpt44 $stack = debug_backtrace();
45 if (!isset($stack[1]))
48 printf("%s(", $stack[1]['function']);
50 foreach ($stack[1]['args'] as $k => $v)
/PHP-5.5/sapi/cgi/
H A Dconfig.w327 ADD_FLAG("LDFLAGS_CGI", "/stack:8388608");
/PHP-5.5/ext/standard/tests/general_functions/
H A Dbug35229.phpt2 Bug #35229 (call_user_func() crashes when argument stack is nearly full)

Completed in 60 milliseconds

1234