~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to Zend/zend_stack.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   +----------------------------------------------------------------------+
 
3
   | Zend Engine                                                          |
 
4
   +----------------------------------------------------------------------+
 
5
   | Copyright (c) 1998-2004 Zend Technologies Ltd. (http://www.zend.com) |
 
6
   +----------------------------------------------------------------------+
 
7
   | This source file is subject to version 2.00 of the Zend license,     |
 
8
   | that is bundled with this package in the file LICENSE, and is        | 
 
9
   | available through the world-wide-web at the following url:           |
 
10
   | http://www.zend.com/license/2_00.txt.                                |
 
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.              |
 
14
   +----------------------------------------------------------------------+
 
15
   | Authors: Andi Gutmans <andi@zend.com>                                |
 
16
   |          Zeev Suraski <zeev@zend.com>                                |
 
17
   +----------------------------------------------------------------------+
 
18
*/
 
19
 
 
20
/* $Id: zend_stack.h,v 1.18 2004/02/18 22:44:40 hholzgra Exp $ */
 
21
 
 
22
#ifndef ZEND_STACK_H
 
23
#define ZEND_STACK_H
 
24
 
 
25
typedef struct _zend_stack {
 
26
        int top, max;
 
27
        void **elements;
 
28
} zend_stack;
 
29
 
 
30
 
 
31
#define STACK_BLOCK_SIZE 64
 
32
 
 
33
BEGIN_EXTERN_C()
 
34
ZEND_API int zend_stack_init(zend_stack *stack);
 
35
ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size);
 
36
ZEND_API int zend_stack_top(zend_stack *stack, void **element);
 
37
ZEND_API int zend_stack_del_top(zend_stack *stack);
 
38
ZEND_API int zend_stack_int_top(zend_stack *stack);
 
39
ZEND_API int zend_stack_is_empty(zend_stack *stack);
 
40
ZEND_API int zend_stack_destroy(zend_stack *stack);
 
41
ZEND_API void **zend_stack_base(zend_stack *stack);
 
42
ZEND_API int zend_stack_count(zend_stack *stack);
 
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);
 
45
END_EXTERN_C()
 
46
 
 
47
#define ZEND_STACK_APPLY_TOPDOWN        1
 
48
#define ZEND_STACK_APPLY_BOTTOMUP       2
 
49
 
 
50
#endif /* ZEND_STACK_H */
 
51
 
 
52
/*
 
53
 * Local variables:
 
54
 * tab-width: 4
 
55
 * c-basic-offset: 4
 
56
 * indent-tabs-mode: t
 
57
 * End:
 
58
 */