Back to index

php5  5.3.10
zend_variables.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | Zend Engine                                                          |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 2.00 of the Zend license,     |
00008    | that is bundled with this package in the file LICENSE, and is        | 
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.zend.com/license/2_00.txt.                                |
00011    | If you did not receive a copy of the Zend license and are unable to  |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@zend.com so we can mail you a copy immediately.              |
00014    +----------------------------------------------------------------------+
00015    | Authors: Andi Gutmans <andi@zend.com>                                |
00016    |          Zeev Suraski <zeev@zend.com>                                |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: zend_variables.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef ZEND_VARIABLES_H
00023 #define ZEND_VARIABLES_H
00024 
00025 
00026 BEGIN_EXTERN_C()
00027 
00028 ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC);
00029 
00030 static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
00031 {
00032        if (zvalue->type <= IS_BOOL) {
00033               return;
00034        }
00035        _zval_dtor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
00036 }
00037 
00038 ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
00039 
00040 static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
00041 {
00042        if (zvalue->type <= IS_BOOL) {
00043               return;
00044        }
00045        _zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
00046 }
00047 
00048 
00049 ZEND_API int zend_print_variable(zval *var);
00050 ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
00051 ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
00052 ZEND_API void _zval_internal_ptr_dtor(zval **zvalue ZEND_FILE_LINE_DC);
00053 ZEND_API void _zval_dtor_wrapper(zval *zvalue);
00054 #define zval_copy_ctor(zvalue) _zval_copy_ctor((zvalue) ZEND_FILE_LINE_CC)
00055 #define zval_dtor(zvalue) _zval_dtor((zvalue) ZEND_FILE_LINE_CC)
00056 #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
00057 #define zval_internal_dtor(zvalue) _zval_internal_dtor((zvalue) ZEND_FILE_LINE_CC)
00058 #define zval_internal_ptr_dtor(zvalue) _zval_internal_ptr_dtor((zvalue) ZEND_FILE_LINE_CC)
00059 #define zval_dtor_wrapper _zval_dtor_wrapper
00060 
00061 #if ZEND_DEBUG
00062 ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue);
00063 ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr);
00064 ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue);
00065 ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue);
00066 #define zval_copy_ctor_wrapper _zval_copy_ctor_wrapper
00067 #define zval_ptr_dtor_wrapper _zval_ptr_dtor_wrapper
00068 #define zval_internal_dtor_wrapper _zval_internal_dtor_wrapper
00069 #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor_wrapper
00070 #else
00071 #define zval_copy_ctor_wrapper _zval_copy_ctor_func
00072 #define zval_ptr_dtor_wrapper _zval_ptr_dtor
00073 #define zval_internal_dtor_wrapper _zval_internal_dtor
00074 #define zval_internal_ptr_dtor_wrapper _zval_internal_ptr_dtor
00075 #endif
00076 
00077 ZEND_API void zval_add_ref(zval **p);
00078 
00079 ZEND_API void zval_property_ctor(zval **);
00080 
00081 #ifdef ZTS
00082 # define zval_shared_property_ctor zval_property_ctor
00083 #else
00084 # define zval_shared_property_ctor zval_add_ref
00085 #endif
00086 
00087 #define zval_copy_property_ctor(ce) ((copy_ctor_func_t) (((ce)->type == ZEND_INTERNAL_CLASS) ? zval_shared_property_ctor : zval_add_ref))
00088 
00089 
00090 END_EXTERN_C()
00091 
00092 #define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
00093 #define ZVAL_PTR_DTOR (void (*)(void *)) zval_ptr_dtor_wrapper
00094 #define ZVAL_INTERNAL_DTOR (void (*)(void *)) zval_internal_dtor_wrapper
00095 #define ZVAL_INTERNAL_PTR_DTOR (void (*)(void *)) zval_internal_ptr_dtor_wrapper
00096 #define ZVAL_COPY_CTOR (void (*)(void *)) zval_copy_ctor_wrapper
00097 
00098 #endif
00099 
00100 /*
00101  * Local variables:
00102  * tab-width: 4
00103  * c-basic-offset: 4
00104  * indent-tabs-mode: t
00105  * End:
00106  */