1 : /*
2 : +----------------------------------------------------------------------+
3 : | Zend Engine |
4 : +----------------------------------------------------------------------+
5 : | Copyright (c) 1998-2007 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_variables.h,v 1.34.2.1.2.1 2007/01/01 09:35:47 sebastian Exp $ */
21 :
22 : #ifndef ZEND_VARIABLES_H
23 : #define ZEND_VARIABLES_H
24 :
25 :
26 : BEGIN_EXTERN_C()
27 :
28 : ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC);
29 :
30 : static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
31 507965 : {
32 507965 : if (zvalue->type <= IS_BOOL) {
33 353697 : return;
34 : }
35 154268 : _zval_dtor_func(zvalue ZEND_FILE_LINE_CC);
36 : }
37 :
38 : ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
39 :
40 : static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
41 133119 : {
42 133119 : if (zvalue->type <= IS_BOOL) {
43 103493 : return;
44 : }
45 29626 : _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_CC);
46 : }
47 :
48 :
49 : ZEND_API int zend_print_variable(zval *var);
50 : ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
51 : ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
52 : ZEND_API void _zval_internal_ptr_dtor(zval **zvalue ZEND_FILE_LINE_DC);
53 : #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
54 : #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
55 : #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
56 : #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
57 : #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
58 :
59 : #if ZEND_DEBUG
60 : ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue);
61 : ZEND_API void _zval_dtor_wrapper(zval *zvalue);
62 : ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr);
63 : ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue);
64 : ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue);
65 : #define zval_copy_ctor_wrapper _zval_copy_ctor_wrapper
66 : #define zval_dtor_wrapper _zval_dtor_wrapper
67 : #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
68 : #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper
69 : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper
70 : #else
71 : #define zval_copy_ctor_wrapper _zval_copy_ctor_func
72 : #define zval_dtor_wrapper _zval_dtor_func
73 : #define zval_ptr_dtor_wrapper _zval_ptr_dtor
74 : #define zval_internal_dtor_wrapper _zval_internal_dtor
75 : #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor
76 : #endif
77 :
78 : ZEND_API void zval_add_ref(zval **p);
79 :
80 : END_EXTERN_C()
81 :
82 : #define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
83 : #define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
84 : #define ZVAL_INTERNAL_DTOR (void (*)(void *)) zval_internal_dtor_wrapper
85 : #define ZVAL_INTERNAL_PTR_DTOR (void (*)(void *)) zval_internal_ptr_dtor_wrapper
86 : #define ZVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper
87 :
88 : #endif
89 :
90 : /*
91 : * Local variables:
92 : * tab-width: 4
93 : * c-basic-offset: 4
94 : * indent-tabs-mode: t
95 : * End:
96 : */
|