summaryrefslogtreecommitdiff
path: root/Zend/zend_ptr_stack.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-07-11 11:19:58 +0000
committerAntony Dovgal <tony2001@php.net>2007-07-11 11:19:58 +0000
commitdd8af0654af40329bd5daa9e2f73f1cbf64f059a (patch)
tree40fa37353491be3782fae62782ed771029396f1f /Zend/zend_ptr_stack.c
parent5a888bc9bd8f83e57eb35f6fa9d927a4e63350ce (diff)
downloadphp-git-dd8af0654af40329bd5daa9e2f73f1cbf64f059a.tar.gz
fix folding, CS and WS
Diffstat (limited to 'Zend/zend_ptr_stack.c')
-rw-r--r--Zend/zend_ptr_stack.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c
index 2a539c2720..6c24096fd4 100644
--- a/Zend/zend_ptr_stack.c
+++ b/Zend/zend_ptr_stack.c
@@ -25,15 +25,15 @@
# include <stdarg.h>
#endif
-ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
+ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack) /* {{{ */
{
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE);
stack->max = PTR_STACK_BLOCK_SIZE;
stack->top = 0;
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
+ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...) /* {{{ */
{
va_list ptr;
void *elem;
@@ -49,9 +49,9 @@ ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
}
va_end(ptr);
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...)
+ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...) /* {{{ */
{
va_list ptr;
void **elem;
@@ -65,18 +65,17 @@ ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...)
}
va_end(ptr);
}
+/* }}} */
-
-
-ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack)
+ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack) /* {{{ */
{
if (stack->elements) {
efree(stack->elements);
}
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
+ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *)) /* {{{ */
{
int i = stack->top;
@@ -84,9 +83,9 @@ ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
func(stack->elements[i]);
}
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements)
+ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements) /* {{{ */
{
zend_ptr_stack_apply(stack, func);
if (free_elements) {
@@ -99,12 +98,13 @@ ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *),
stack->top = 0;
stack->top_element = stack->elements;
}
+/* }}} */
-
-ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
+ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack) /* {{{ */
{
return stack->top;
}
+/* }}} */
/*
* Local variables: