summaryrefslogtreecommitdiff
path: root/Zend/zend_stack.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-08-12 17:20:25 +0000
committerFelipe Pena <felipe@php.net>2008-08-12 17:20:25 +0000
commitcf7384aa4015de9dd21a958146933bbf1f13f0a9 (patch)
treeefbb0fd4c63087999c35433354bcaee2d5cb35bd /Zend/zend_stack.c
parent05376077b31f6f884e3d6630124c21972a29687c (diff)
downloadphp-git-cf7384aa4015de9dd21a958146933bbf1f13f0a9.tar.gz
- MFH: Constness (Added const qualifier to several function parameters)
Diffstat (limited to 'Zend/zend_stack.c')
-rw-r--r--Zend/zend_stack.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c
index d982277e2d..e1f84c9b14 100644
--- a/Zend/zend_stack.c
+++ b/Zend/zend_stack.c
@@ -34,7 +34,7 @@ ZEND_API int zend_stack_init(zend_stack *stack)
}
}
-ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size)
+ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size)
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
stack->elements = (void **) erealloc(stack->elements,
@@ -49,7 +49,7 @@ ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size)
}
-ZEND_API int zend_stack_top(zend_stack *stack, void **element)
+ZEND_API int zend_stack_top(const zend_stack *stack, void **element)
{
if (stack->top > 0) {
*element = stack->elements[stack->top - 1];
@@ -70,7 +70,7 @@ ZEND_API int zend_stack_del_top(zend_stack *stack)
}
-ZEND_API int zend_stack_int_top(zend_stack *stack)
+ZEND_API int zend_stack_int_top(const zend_stack *stack)
{
int *e;
@@ -82,7 +82,7 @@ ZEND_API int zend_stack_int_top(zend_stack *stack)
}
-ZEND_API int zend_stack_is_empty(zend_stack *stack)
+ZEND_API int zend_stack_is_empty(const zend_stack *stack)
{
if (stack->top == 0) {
return 1;
@@ -108,13 +108,13 @@ ZEND_API int zend_stack_destroy(zend_stack *stack)
}
-ZEND_API void **zend_stack_base(zend_stack *stack)
+ZEND_API void **zend_stack_base(const zend_stack *stack)
{
return stack->elements;
}
-ZEND_API int zend_stack_count(zend_stack *stack)
+ZEND_API int zend_stack_count(const zend_stack *stack)
{
return stack->top;
}