diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-11-16 17:09:01 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-11-16 17:09:01 +0300 |
commit | ce18738a30b3d7f20b392c9167aa251c009a0c21 (patch) | |
tree | 08b65848c83fac1e601ace51c110be74844bf362 /Zend/zend_operators.h | |
parent | 50eeb46e216520027b147a7117f902d4c4a54ebc (diff) | |
download | php-git-ce18738a30b3d7f20b392c9167aa251c009a0c21.tar.gz |
Removed "_" from API functions.
Diffstat (limited to 'Zend/zend_operators.h')
-rw-r--r-- | Zend/zend_operators.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index e11d2551f5..9ded26db9b 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -259,23 +259,27 @@ ZEND_API void multi_convert_to_long_ex(int argc, ...); ZEND_API void multi_convert_to_double_ex(int argc, ...); ZEND_API void multi_convert_to_string_ex(int argc, ...); -ZEND_API zend_long ZEND_FASTCALL _zval_get_long_func(zval *op); -ZEND_API double ZEND_FASTCALL _zval_get_double_func(zval *op); -ZEND_API zend_string* ZEND_FASTCALL _zval_get_string_func(zval *op); +ZEND_API zend_long ZEND_FASTCALL zval_get_long_func(zval *op); +ZEND_API double ZEND_FASTCALL zval_get_double_func(zval *op); +ZEND_API zend_string* ZEND_FASTCALL zval_get_string_func(zval *op); -static zend_always_inline zend_long _zval_get_long(zval *op) { - return Z_TYPE_P(op) == IS_LONG ? Z_LVAL_P(op) : _zval_get_long_func(op); +static zend_always_inline zend_long zval_get_long(zval *op) { + return EXPECTED(Z_TYPE_P(op) == IS_LONG) ? Z_LVAL_P(op) : zval_get_long_func(op); } -static zend_always_inline double _zval_get_double(zval *op) { - return Z_TYPE_P(op) == IS_DOUBLE ? Z_DVAL_P(op) : _zval_get_double_func(op); +static zend_always_inline double zval_get_double(zval *op) { + return EXPECTED(Z_TYPE_P(op) == IS_DOUBLE) ? Z_DVAL_P(op) : zval_get_double_func(op); } -static zend_always_inline zend_string *_zval_get_string(zval *op) { - return Z_TYPE_P(op) == IS_STRING ? zend_string_copy(Z_STR_P(op)) : _zval_get_string_func(op); +static zend_always_inline zend_string *zval_get_string(zval *op) { + return EXPECTED(Z_TYPE_P(op) == IS_STRING) ? zend_string_copy(Z_STR_P(op)) : zval_get_string_func(op); } -#define zval_get_long(op) _zval_get_long((op)) -#define zval_get_double(op) _zval_get_double((op)) -#define zval_get_string(op) _zval_get_string((op)) +/* Compatibility macros for 7.2 and below */ +#define _zval_get_long(op) zval_get_long(op) +#define _zval_get_double(op) zval_get_double(op) +#define _zval_get_string(op) zval_get_string(op) +#define _zval_get_long_func(op) zval_get_long_func(op) +#define _zval_get_double_func(op) zval_get_double_func(op) +#define _zval_get_string_func(op) zval_get_string_func(op) #define convert_to_cstring(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_cstring((op) ZEND_FILE_LINE_CC); } #define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op) ZEND_FILE_LINE_CC); } |