summaryrefslogtreecommitdiff
path: root/Zend/zend_stack.h
diff options
context:
space:
mode:
authorkrakjoe <joe.watkins@live.co.uk>2014-05-05 22:45:29 +0100
committerkrakjoe <joe.watkins@live.co.uk>2014-05-05 22:45:29 +0100
commitd7c529ed327cca4fad2c42fe74fabc367f24dc5b (patch)
tree919d9e6800c6244436ddce9d09d707922fd859a4 /Zend/zend_stack.h
parent875c48ae679158cb2194c4e277810883e0b21768 (diff)
parent211d32c81429730e2692c65577d021616a525726 (diff)
downloadphp-git-d7c529ed327cca4fad2c42fe74fabc367f24dc5b.tar.gz
Merge branch 'phpng' of git.php.net:php-src into phpng
Diffstat (limited to 'Zend/zend_stack.h')
-rw-r--r--Zend/zend_stack.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/Zend/zend_stack.h b/Zend/zend_stack.h
index d484879468..6700053258 100644
--- a/Zend/zend_stack.h
+++ b/Zend/zend_stack.h
@@ -23,25 +23,26 @@
#define ZEND_STACK_H
typedef struct _zend_stack {
- int top, max;
- void **elements;
+ int size, top, max;
+ void *elements;
} zend_stack;
-#define STACK_BLOCK_SIZE 64
+#define STACK_BLOCK_SIZE 16
BEGIN_EXTERN_C()
-ZEND_API int zend_stack_init(zend_stack *stack);
-ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size);
-ZEND_API int zend_stack_top(const zend_stack *stack, void **element);
+ZEND_API int zend_stack_init(zend_stack *stack, int size);
+ZEND_API int zend_stack_push(zend_stack *stack, const void *element);
+ZEND_API void *zend_stack_top(const zend_stack *stack);
ZEND_API int zend_stack_del_top(zend_stack *stack);
ZEND_API int zend_stack_int_top(const zend_stack *stack);
ZEND_API int zend_stack_is_empty(const zend_stack *stack);
ZEND_API int zend_stack_destroy(zend_stack *stack);
-ZEND_API void **zend_stack_base(const zend_stack *stack);
+ZEND_API void *zend_stack_base(const zend_stack *stack);
ZEND_API int zend_stack_count(const zend_stack *stack);
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg);
+ZEND_API void zend_stack_clean(zend_stack *stack, void (*func)(void *), zend_bool free_elements);
END_EXTERN_C()
#define ZEND_STACK_APPLY_TOPDOWN 1