com php-src: some more pure naming replacements: Zend/zend_AP I.h Zend/zend_operators.c Zend/zend_operators.h ext/pcre/php_pcre.c
ext/standard/array.c ext/stand ard/html.c ext/standard/math.c ext/standard/string.c ext/standard/type.c

From: Date: Sun, 17 Aug 2014 19:16:27 +0000
Subject: com php-src: some more pure naming replacements: Zend/zend_AP I.h Zend/zend_operators.c Zend/zend_operators.h ext/pcre/php_pcre.c
ext/standard/array.c ext/stand ard/html.c ext/standard/math.c ext/standard/string.c ext/standard/type.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-80779@lists.php.net to get a copy of this message
Commit: f2182ab845236a112ff63bcb8752b07943c999f1 Author: Anatol Belski <ab@php.net> Sun, 17 Aug 2014 21:16:27 +0200 Parents: 41115d3d9dc1f7116ac2d1bb7087a24098885a03 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f2182ab845236a112ff63bcb8752b07943c999f1 Log: some more pure naming replacements Changed paths: M Zend/zend_API.h M Zend/zend_operators.c M Zend/zend_operators.h M ext/pcre/php_pcre.c M ext/standard/array.c M ext/standard/html.c M ext/standard/math.c M ext/standard/string.c M ext/standard/type.c

diff --git a/Zend/zend_API.h b/Zend/zend_API.h index fa4ca96..180cfbc 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -898,7 +898,7 @@ ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int chec Z_PARAM_ARRAY_OR_OBJECT_HT_EX(dest, 0, 0) /* old "l" */ -#define Z_PARAM_LONG_EX(dest, is_null, check_null, separate) \ +#define Z_PARAM_INT_EX(dest, is_null, check_null, separate) \ Z_PARAM_PROLOGUE(separate); \ if (UNEXPECTED(!_z_param_long(_arg, &dest, &is_null, check_null, 0))) { \ _expected_type = Z_EXPECTED_LONG; \ @@ -906,11 +906,11 @@ ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int chec break; \ } -#define Z_PARAM_LONG(dest) \ - Z_PARAM_LONG_EX(dest, _dummy, 0, 0) +#define Z_PARAM_INT(dest) \ + Z_PARAM_INT_EX(dest, _dummy, 0, 0) /* old "L" */ -#define Z_PARAM_STRICT_LONG_EX(dest, is_null, check_null, separate) \ +#define Z_PARAM_STRICT_INT_EX(dest, is_null, check_null, separate) \ Z_PARAM_PROLOGUE(separate); \ if (UNEXPECTED(!_z_param_long(_arg, &dest, &is_null, check_null, 1))) { \ _expected_type = Z_EXPECTED_LONG; \ @@ -918,8 +918,8 @@ ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int chec break; \ } -#define Z_PARAM_STRICT_LONG(dest) \ - Z_PARAM_STRICT_LONG_EX(dest, _dummy, 0, 0) +#define Z_PARAM_STRICT_INT(dest) \ + Z_PARAM_STRICT_INT_EX(dest, _dummy, 0, 0) /* old "o" */ #define Z_PARAM_OBJECT_EX(dest, check_null, separate) \ diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 514dc6c..6a81999 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -604,7 +604,7 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */ break; } case IS_INT: { - ZVAL_NEW_STR(op, zend_long_to_str(Z_IVAL_P(op))); + ZVAL_NEW_STR(op, zend_int_to_str(Z_IVAL_P(op))); break; } case IS_DOUBLE: { @@ -784,7 +784,7 @@ ZEND_API void multi_convert_to_string_ex(int argc, ...) /* {{{ */ } /* }}} */ -ZEND_API zend_int_t _zval_get_long_func(zval *op TSRMLS_DC) /* {{{ */ +ZEND_API zend_int_t _zval_get_int_func(zval *op TSRMLS_DC) /* {{{ */ { try_again: switch (Z_TYPE_P(op)) { @@ -883,7 +883,7 @@ try_again: return STR_INIT(buf, len, 0); } case IS_INT: { - return zend_long_to_str(Z_IVAL_P(op)); + return zend_int_to_str(Z_IVAL_P(op)); } case IS_DOUBLE: { return zend_strpprintf(0, "%.*G", (int) EG(precision), Z_DVAL_P(op)); @@ -2558,7 +2558,7 @@ ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC) /* {{{ */ } /* }}} */ -ZEND_API zend_string *zend_long_to_str(zend_int_t num) /* {{{ */ +ZEND_API zend_string *zend_int_to_str(zend_int_t num) /* {{{ */ { char buf[MAX_LENGTH_OF_ZEND_INT + 1]; char *res; diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 92550f9..b8e7c0e 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -344,12 +344,12 @@ ZEND_API void multi_convert_to_int_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_int_t _zval_get_long_func(zval *op TSRMLS_DC); +ZEND_API zend_int_t _zval_get_int_func(zval *op TSRMLS_DC); ZEND_API double _zval_get_double_func(zval *op TSRMLS_DC); ZEND_API zend_string *_zval_get_string_func(zval *op TSRMLS_DC); static zend_always_inline zend_int_t _zval_get_long(zval *op TSRMLS_DC) { - return Z_TYPE_P(op) == IS_INT ? Z_IVAL_P(op) : _zval_get_long_func(op TSRMLS_CC); + return Z_TYPE_P(op) == IS_INT ? Z_IVAL_P(op) : _zval_get_int_func(op TSRMLS_CC); } static zend_always_inline double _zval_get_double(zval *op TSRMLS_DC) { return Z_TYPE_P(op) == IS_DOUBLE ? Z_DVAL_P(op) : _zval_get_double_func(op TSRMLS_CC); @@ -1045,7 +1045,7 @@ static zend_always_inline void fast_is_not_identical_function(zval *result, zval } \ } while (0) -ZEND_API zend_string *zend_long_to_str(zend_int_t num); +ZEND_API zend_string *zend_int_to_str(zend_int_t num); #endif diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 3990580..d7c7c56 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -558,8 +558,8 @@ static void php_do_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) /* {{{ * Z_PARAM_STR(subject) Z_PARAM_OPTIONAL Z_PARAM_ZVAL_EX(subpats, 0, 1) - Z_PARAM_LONG(flags) - Z_PARAM_LONG(start_offset) + Z_PARAM_INT(flags) + Z_PARAM_INT(start_offset) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); #endif @@ -1452,7 +1452,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, int is_callable_repl Z_PARAM_ZVAL(replace) Z_PARAM_ZVAL(subject) Z_PARAM_OPTIONAL - Z_PARAM_LONG(limit) + Z_PARAM_INT(limit) Z_PARAM_ZVAL_EX(zcount, 0, 1) ZEND_PARSE_PARAMETERS_END(); #endif @@ -1569,8 +1569,8 @@ static PHP_FUNCTION(preg_split) Z_PARAM_STR(regex) Z_PARAM_STR(subject) Z_PARAM_OPTIONAL - Z_PARAM_LONG(limit_val) - Z_PARAM_LONG(flags) + Z_PARAM_INT(limit_val) + Z_PARAM_INT(flags) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); #endif @@ -1876,7 +1876,7 @@ static PHP_FUNCTION(preg_grep) Z_PARAM_STR(regex) Z_PARAM_ARRAY(input) Z_PARAM_OPTIONAL - Z_PARAM_LONG(flags) + Z_PARAM_INT(flags) ZEND_PARSE_PARAMETERS_END(); #endif diff --git a/ext/standard/array.c b/ext/standard/array.c index 72e473f..b04509a 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -300,7 +300,7 @@ PHP_FUNCTION(count) ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(array) Z_PARAM_OPTIONAL - Z_PARAM_LONG(mode) + Z_PARAM_INT(mode) ZEND_PARSE_PARAMETERS_END(); #endif @@ -2237,7 +2237,7 @@ PHP_FUNCTION(array_slice) #else ZEND_PARSE_PARAMETERS_START(2, 4) Z_PARAM_ARRAY(input) - Z_PARAM_LONG(offset) + Z_PARAM_INT(offset) Z_PARAM_OPTIONAL Z_PARAM_ZVAL(z_length) Z_PARAM_BOOL(preserve_keys) diff --git a/ext/standard/html.c b/ext/standard/html.c index e729c12..abb15f2 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1456,7 +1456,7 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all) ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_STR(str) Z_PARAM_OPTIONAL - Z_PARAM_LONG(flags) + Z_PARAM_INT(flags) Z_PARAM_STR_EX(hint_charset, 1, 0) Z_PARAM_BOOL(double_encode); ZEND_PARSE_PARAMETERS_END(); @@ -1540,7 +1540,7 @@ PHP_FUNCTION(html_entity_decode) ZEND_PARSE_PARAMETERS_START(1, 3) Z_PARAM_STR(str) Z_PARAM_OPTIONAL - Z_PARAM_LONG(quote_style) + Z_PARAM_INT(quote_style) Z_PARAM_STR(hint_charset) ZEND_PARSE_PARAMETERS_END(); #endif diff --git a/ext/standard/math.c b/ext/standard/math.c index bf97f43..648408e 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -1363,7 +1363,7 @@ PHP_FUNCTION(number_format) ZEND_PARSE_PARAMETERS_START(1, 4) Z_PARAM_DOUBLE(num) Z_PARAM_OPTIONAL - Z_PARAM_LONG(dec) + Z_PARAM_INT(dec) Z_PARAM_STRING_EX(dec_point, dec_point_len, 1, 0) Z_PARAM_STRING_EX(thousand_sep, thousand_sep_len, 1, 0) ZEND_PARSE_PARAMETERS_END(); diff --git a/ext/standard/string.c b/ext/standard/string.c index 0761f88..7d96fce 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1096,7 +1096,7 @@ PHP_FUNCTION(explode) Z_PARAM_STR(delim) Z_PARAM_STR(str) Z_PARAM_OPTIONAL - Z_PARAM_LONG(limit) + Z_PARAM_INT(limit) ZEND_PARSE_PARAMETERS_END(); #endif @@ -1812,7 +1812,7 @@ PHP_FUNCTION(strpos) Z_PARAM_STR(haystack) Z_PARAM_ZVAL(needle) Z_PARAM_OPTIONAL - Z_PARAM_LONG(offset) + Z_PARAM_INT(offset) ZEND_PARSE_PARAMETERS_END(); #endif @@ -1934,7 +1934,7 @@ PHP_FUNCTION(strrpos) Z_PARAM_STR(haystack) Z_PARAM_ZVAL(zneedle) Z_PARAM_OPTIONAL - Z_PARAM_LONG(offset) + Z_PARAM_INT(offset) ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE); #endif @@ -2243,9 +2243,9 @@ PHP_FUNCTION(substr) #else ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(str) - Z_PARAM_LONG(f) + Z_PARAM_INT(f) Z_PARAM_OPTIONAL - Z_PARAM_LONG(l) + Z_PARAM_INT(l) ZEND_PARSE_PARAMETERS_END(); #endif diff --git a/ext/standard/type.c b/ext/standard/type.c index 57b3b61..574744d 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -151,7 +151,7 @@ PHP_FUNCTION(intval) ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_ZVAL(num) Z_PARAM_OPTIONAL - Z_PARAM_LONG(base) + Z_PARAM_INT(base) ZEND_PARSE_PARAMETERS_END(); #endif
« previous php.cvs (#80779) next »