com php-src: Separate argument passed by reference: ext/intl/dateformat/dateformat_parse.c ext/intl/formatter /formatter_parse.c
ext/intl/grapheme/grapheme_string. c ext/intl/idn/idn.c ext/intl/timezone/timezone_methods .cpp
| From: | Dmitry Stogov | Date: | Tue, 08 Jul 2014 12:40:26 +0000 |
| Subject: | com php-src: Separate argument passed by reference: ext/intl/dateformat/dateformat_parse.c ext/intl/formatter /formatter_parse.c ext/intl/grapheme/grapheme_string. c ext/intl/idn/idn.c ext/intl/timezone/timezone_methods .cpp |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79335@lists.php.net to get a copy of this message | ||
Commit: 3ad4a8a5fa06149e4df3b6b4f7d258d90b4abd5d
Author: Dmitry Stogov <dmitry@zend.com> Tue, 8 Jul 2014 16:40:26 +0400
Parents: 7edb66c4ae8851e6365dbbe4f97c5fe81ec5d358
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3ad4a8a5fa06149e4df3b6b4f7d258d90b4abd5d
Log:
Separate argument passed by reference
Changed paths:
M ext/intl/dateformat/dateformat_parse.c
M ext/intl/formatter/formatter_parse.c
M ext/intl/grapheme/grapheme_string.c
M ext/intl/idn/idn.c
M ext/intl/timezone/timezone_methods.cpp
Diff:
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index 8c8ff76..fb3da3e 100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
@@ -135,7 +135,7 @@ PHP_FUNCTION(datefmt_parse)
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z/!",
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) ==
FAILURE ){
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input
params", 0 TSRMLS_CC );
RETURN_FALSE;
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index 62fc2b1..73b3313 100644
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -50,7 +50,7 @@ PHP_FUNCTION( numfmt_parse )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|lz!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|lz/!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &type, &zposition ) ==
FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -139,7 +139,7 @@ PHP_FUNCTION( numfmt_parse_currency )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osz|z!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osz/|z/!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &zcurrency, &zposition ) ==
FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index eeb44d8..5caacb4 100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -844,6 +844,7 @@ PHP_FUNCTION(grapheme_extract)
else {
ZVAL_DEREF(next);
/* initialize next */
+ SEPARATE_ZVAL(next);
zval_dtor(next);
ZVAL_LONG(next, lstart);
}
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index 5b463ea..6bf187a 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -271,7 +271,7 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
intl_error_reset(NULL TSRMLS_CC);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|llz",
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|llz/",
&domain, &domain_len, &option, &variant, &idna_info) == FAILURE) {
php_intl_bad_args("bad arguments", mode TSRMLS_CC);
RETURN_NULL(); /* don't set FALSE because that's not the way it was before... */
diff --git a/ext/intl/timezone/timezone_methods..cpp b/ext/intl/timezone/timezone_methods.cpp
index 2b1bcfa..a8332db 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -469,7 +469,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset)
TIMEZONE_METHOD_INIT_VARS;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
- "Odbzz", &object, TimeZone_ce_ptr, &date, &local, &rawOffsetArg,
+ "Odbz/z/", &object, TimeZone_ce_ptr, &date, &local, &rawOffsetArg,
&dstOffsetArg) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intltz_get_offset: bad arguments", 0 TSRMLS_CC);