Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 59 lines (49 sloc) 2.381 kB
573b460 @andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
8775a37 @felipensp - Year++
felipensp authored
5 | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
573b460 @andigutmans Zend Library
andigutmans authored
6 +----------------------------------------------------------------------+
d863d52 Update headers.
Sebastian Bergmann authored
7 | This source file is subject to version 2.00 of the Zend license, |
b5b1117 @zsuraski License update
zsuraski authored
8 | that is bundled with this package in the file LICENSE, and is |
f68c7ff updating license information in the headers.
James Cox authored
9 | available through the world-wide-web at the following url: |
d863d52 Update headers.
Sebastian Bergmann authored
10 | http://www.zend.com/license/2_00.txt. |
b5b1117 @zsuraski License update
zsuraski authored
11 | If you did not receive a copy of the Zend license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@zend.com so we can mail you a copy immediately. |
573b460 @andigutmans Zend Library
andigutmans authored
14 +----------------------------------------------------------------------+
15 | Authors: Andi Gutmans <andi@zend.com> |
16 | Zeev Suraski <zeev@zend.com> |
17 +----------------------------------------------------------------------+
18 */
19
333406b - Added some missing CVS $Id$ tags, headers and footers.
foobar authored
20 /* $Id$ */
b5b1117 @zsuraski License update
zsuraski authored
21
b982307 Change header protection macros to conform to standard.
Sascha Schumann authored
22 #ifndef ZEND_STACK_H
23 #define ZEND_STACK_H
573b460 @andigutmans Zend Library
andigutmans authored
24
1250c43 @zsuraski * Add struct name to all typedef's so that they can be debugged with …
zsuraski authored
25 typedef struct _zend_stack {
573b460 @andigutmans Zend Library
andigutmans authored
26 int top, max;
27 void **elements;
28 } zend_stack;
29
30
31 #define STACK_BLOCK_SIZE 64
32
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
33 BEGIN_EXTERN_C()
573b460 @andigutmans Zend Library
andigutmans authored
34 ZEND_API int zend_stack_init(zend_stack *stack);
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
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);
573b460 @andigutmans Zend Library
andigutmans authored
37 ZEND_API int zend_stack_del_top(zend_stack *stack);
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
38 ZEND_API int zend_stack_int_top(const zend_stack *stack);
39 ZEND_API int zend_stack_is_empty(const zend_stack *stack);
573b460 @andigutmans Zend Library
andigutmans authored
40 ZEND_API int zend_stack_destroy(zend_stack *stack);
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
41 ZEND_API void **zend_stack_base(const zend_stack *stack);
42 ZEND_API int zend_stack_count(const zend_stack *stack);
b7cd2bf @zsuraski - Make the argument order for the stack applies more consistent with …
zsuraski authored
43 ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
44 ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg);
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
45 END_EXTERN_C()
573b460 @andigutmans Zend Library
andigutmans authored
46
9c754da @zsuraski Fix RETURN & SWITCH memory leak issue
zsuraski authored
47 #define ZEND_STACK_APPLY_TOPDOWN 1
48 #define ZEND_STACK_APPLY_BOTTOMUP 2
573b460 @andigutmans Zend Library
andigutmans authored
49
b982307 Change header protection macros to conform to standard.
Sascha Schumann authored
50 #endif /* ZEND_STACK_H */
333406b - Added some missing CVS $Id$ tags, headers and footers.
foobar authored
51
52 /*
53 * Local variables:
54 * tab-width: 4
55 * c-basic-offset: 4
56 * indent-tabs-mode: t
57 * End:
58 */
Something went wrong with that request. Please try again.