diff options
Diffstat (limited to 'Zend/zend_constants.h')
-rw-r--r-- | Zend/zend_constants.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index ba0c798dc6..4d3335a490 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -22,16 +22,12 @@ #include "zend_globals.h" -#define CONST_CS (1<<0) /* Case Sensitive */ -#define CONST_PERSISTENT (1<<1) /* Persistent */ -#define CONST_CT_SUBST (1<<2) /* Allow compile-time substitution */ -#define CONST_NO_FILE_CACHE (1<<3) /* Can't be saved in file cache */ +#define CONST_CS 0 /* No longer used -- always case sensitive */ +#define CONST_PERSISTENT (1<<0) /* Persistent */ +#define CONST_NO_FILE_CACHE (1<<1) /* Can't be saved in file cache */ #define PHP_USER_CONSTANT 0x7fffff /* a constant defined in user space */ -/* Flag for zend_get_constant_ex(). Must not class with ZEND_FETCH_CLASS_* flags. */ -#define ZEND_GET_CONSTANT_NO_DEPRECATION_CHECK 0x1000 - typedef struct _zend_constant { zval value; zend_string *name; @@ -89,6 +85,16 @@ ZEND_API int zend_register_constant(zend_constant *c); #ifdef ZTS void zend_copy_constants(HashTable *target, HashTable *sourc); #endif + +ZEND_API zval *_zend_get_special_const(const char *name, size_t name_len); + +static zend_always_inline zval *zend_get_special_const(const char *name, size_t name_len) { + if (name_len == 4 || name_len == 5) { + return _zend_get_special_const(name, name_len); + } + return NULL; +} + END_EXTERN_C() #define ZEND_CONSTANT_DTOR free_zend_constant |