diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2013-11-06 15:41:33 +0400 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2013-11-06 15:41:33 +0400 |
| commit | af600c240d2efe33291e8dd71ce228b9fbc849c1 (patch) | |
| tree | 9a0940e0e80bc92ba9c371f850a595f9347cbfb6 /Zend/zend_operators.h | |
| parent | d87388ba0f6cf29eb495f9af96ab6aa353ebcc4f (diff) | |
| parent | 18e2b1a9a930d5ae15544c5a2beed6b20d58cdee (diff) | |
| download | php-git-af600c240d2efe33291e8dd71ce228b9fbc849c1.tar.gz | |
Merge branch 'const_scalar_exprs' of github.com:bwoebi/php-src into const_scalar_exprs
* 'const_scalar_exprs' of github.com:bwoebi/php-src:
Removed operations on constant arrays. They make no sense as constants are not allowed to be arrays. And as just properties are allowed to; no problem, we still don't need operations on any constant array.
Added a few more operators
Whitespace fix
converted several switches to ifs and made more opcache friendly
Fatal error about self referencing constants fixed
Fixed mem leaks, added tests and ternary operator
Working commit for constant scalar expressions (with constants). Tests will follow.
Conflicts:
Zend/Makefile.am
configure.in
win32/build/config.w32
Diffstat (limited to 'Zend/zend_operators.h')
| -rw-r--r-- | Zend/zend_operators.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 15ad79e4db..3f0fc2ef6a 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -50,6 +50,8 @@ ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); +ZEND_API int boolean_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); +ZEND_API int boolean_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC); ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC); ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); @@ -376,6 +378,8 @@ ZEND_API int zend_atoi(const char *str, int str_len); ZEND_API long zend_atol(const char *str, int str_len); ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC); + +ZEND_API int ternary_function(zval *result, zval *condition, zval *then, zval *if_not TSRMLS_DC); END_EXTERN_C() #define convert_to_ex_master(ppzv, lower_type, upper_type) \ @@ -443,6 +447,7 @@ END_EXTERN_C() #define Z_STRVAL(zval) (zval).value.str.val #define Z_STRLEN(zval) (zval).value.str.len #define Z_ARRVAL(zval) (zval).value.ht +#define Z_AST(zval) (zval).value.ast #define Z_OBJVAL(zval) (zval).value.obj #define Z_OBJ_HANDLE(zval) Z_OBJVAL(zval).handle #define Z_OBJ_HT(zval) Z_OBJVAL(zval).handlers @@ -458,6 +463,7 @@ END_EXTERN_C() #define Z_STRVAL_P(zval_p) Z_STRVAL(*zval_p) #define Z_STRLEN_P(zval_p) Z_STRLEN(*zval_p) #define Z_ARRVAL_P(zval_p) Z_ARRVAL(*zval_p) +#define Z_AST_P(zval_p) Z_AST(*zval_p) #define Z_OBJPROP_P(zval_p) Z_OBJPROP(*zval_p) #define Z_OBJCE_P(zval_p) Z_OBJCE(*zval_p) #define Z_RESVAL_P(zval_p) Z_RESVAL(*zval_p) @@ -473,6 +479,7 @@ END_EXTERN_C() #define Z_STRVAL_PP(zval_pp) Z_STRVAL(**zval_pp) #define Z_STRLEN_PP(zval_pp) Z_STRLEN(**zval_pp) #define Z_ARRVAL_PP(zval_pp) Z_ARRVAL(**zval_pp) +#define Z_AST_PP(zval_p) Z_AST(**zval_p) #define Z_OBJPROP_PP(zval_pp) Z_OBJPROP(**zval_pp) #define Z_OBJCE_PP(zval_pp) Z_OBJCE(**zval_pp) #define Z_RESVAL_PP(zval_pp) Z_RESVAL(**zval_pp) |
