diff options
Diffstat (limited to 'Zend/zend.h')
-rw-r--r-- | Zend/zend.h | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/Zend/zend.h b/Zend/zend.h index d021dd6f6e..f81e859fe7 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -22,7 +22,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "2.5.0" +#define ZEND_VERSION "2.6.0" #define ZEND_ENGINE_2 @@ -193,7 +193,7 @@ char *alloca (); #endif #define restrict __restrict__ -#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) +#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN) # define ZEND_ALLOCA_MAX_SIZE (32 * 1024) # define ALLOCA_FLAG(name) \ zend_bool name; @@ -317,6 +317,7 @@ typedef struct _zend_object { } zend_object; #include "zend_object_handlers.h" +#include "zend_ast.h" typedef union _zvalue_value { long lval; /* long value */ @@ -327,6 +328,7 @@ typedef union _zvalue_value { } str; HashTable *ht; /* hash table value */ zend_object_value obj; + zend_ast *ast; } zvalue_value; struct _zval_struct { @@ -500,6 +502,7 @@ struct _zend_class_entry { union _zend_function *__call; union _zend_function *__callstatic; union _zend_function *__tostring; + union _zend_function *__debugInfo; union _zend_function *serialize_func; union _zend_function *unserialize_func; @@ -586,17 +589,17 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length); #define IS_STRING 6 #define IS_RESOURCE 7 #define IS_CONSTANT 8 -#define IS_CONSTANT_ARRAY 9 +#define IS_CONSTANT_AST 9 #define IS_CALLABLE 10 -/* Ugly hack to support constants as static array indices */ #define IS_CONSTANT_TYPE_MASK 0x00f #define IS_CONSTANT_UNQUALIFIED 0x010 -#define IS_CONSTANT_INDEX 0x080 #define IS_LEXICAL_VAR 0x020 #define IS_LEXICAL_REF 0x040 #define IS_CONSTANT_IN_NAMESPACE 0x100 +#define IS_CONSTANT_TYPE(type) (((type) & IS_CONSTANT_TYPE_MASK) >= IS_CONSTANT && ((type) & IS_CONSTANT_TYPE_MASK) <= IS_CONSTANT_AST) + /* overloaded elements data types */ #define OE_IS_ARRAY (1<<0) #define OE_IS_OBJECT (1<<1) @@ -651,12 +654,14 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); END_EXTERN_C() -void zend_activate(TSRMLS_D); -void zend_deactivate(TSRMLS_D); -void zend_call_destructors(TSRMLS_D); -void zend_activate_modules(TSRMLS_D); -void zend_deactivate_modules(TSRMLS_D); -void zend_post_deactivate_modules(TSRMLS_D); +BEGIN_EXTERN_C() +ZEND_API void zend_activate(TSRMLS_D); +ZEND_API void zend_deactivate(TSRMLS_D); +ZEND_API void zend_call_destructors(TSRMLS_D); +ZEND_API void zend_activate_modules(TSRMLS_D); +ZEND_API void zend_deactivate_modules(TSRMLS_D); +ZEND_API void zend_post_deactivate_modules(TSRMLS_D); +END_EXTERN_C() #if ZEND_DEBUG #define Z_DBG(expr) (expr) @@ -670,10 +675,14 @@ END_EXTERN_C() /* FIXME: Check if we can save if (ptr) too */ -#define STR_FREE(ptr) if (ptr && !IS_INTERNED(ptr)) { efree(ptr); } -#define STR_FREE_REL(ptr) if (ptr && !IS_INTERNED(ptr)) { efree_rel(ptr); } +#define STR_FREE(ptr) if (ptr) { str_efree(ptr); } +#define STR_FREE_REL(ptr) if (ptr) { str_efree_rel(ptr); } +#ifndef ZTS +#define STR_EMPTY_ALLOC() CG(interned_empty_string)? CG(interned_empty_string) : estrndup("", sizeof("")-1) +#else #define STR_EMPTY_ALLOC() estrndup("", sizeof("")-1) +#endif #define STR_REALLOC(ptr, size) \ ptr = (char *) erealloc(ptr, size); @@ -683,7 +692,7 @@ END_EXTERN_C() #define ZEND_WRITE_EX(str, str_len) write_func((str), (str_len)) #define ZEND_PUTS(str) zend_write((str), strlen((str))) #define ZEND_PUTS_EX(str) write_func((str), strlen((str))) -#define ZEND_PUTC(c) zend_write(&(c), 1), (c) +#define ZEND_PUTC(c) zend_write(&(c), 1) BEGIN_EXTERN_C() extern ZEND_API int (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2); |