mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/intl: common use fast ZPP (#14422)
This commit is contained in:
@@ -208,9 +208,7 @@ PHP_METHOD(IntlIterator, current)
|
||||
zval *data;
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
INTLITERATOR_METHOD_FETCH_OBJECT;
|
||||
data = ii->iterator->funcs->get_current_data(ii->iterator);
|
||||
@@ -223,9 +221,7 @@ PHP_METHOD(IntlIterator, key)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
INTLITERATOR_METHOD_FETCH_OBJECT;
|
||||
|
||||
@@ -240,9 +236,7 @@ PHP_METHOD(IntlIterator, next)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
INTLITERATOR_METHOD_FETCH_OBJECT;
|
||||
ii->iterator->funcs->move_forward(ii->iterator);
|
||||
@@ -255,9 +249,7 @@ PHP_METHOD(IntlIterator, rewind)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
INTLITERATOR_METHOD_FETCH_OBJECT;
|
||||
if (ii->iterator->funcs->rewind) {
|
||||
@@ -272,9 +264,7 @@ PHP_METHOD(IntlIterator, valid)
|
||||
{
|
||||
INTLITERATOR_METHOD_INIT_VARS;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
INTLITERATOR_METHOD_FETCH_OBJECT;
|
||||
RETURN_BOOL(ii->iterator->funcs->valid(ii->iterator) == SUCCESS);
|
||||
|
||||
@@ -23,9 +23,7 @@
|
||||
/* {{{ Get code of the last occurred error. */
|
||||
PHP_FUNCTION( intl_get_error_code )
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_LONG( intl_error_get_code( NULL ) );
|
||||
}
|
||||
@@ -34,9 +32,7 @@ PHP_FUNCTION( intl_get_error_code )
|
||||
/* {{{ Get text description of the last occurred error. */
|
||||
PHP_FUNCTION( intl_get_error_message )
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_NONE();
|
||||
|
||||
RETURN_STR(intl_error_get_message( NULL ));
|
||||
}
|
||||
@@ -50,12 +46,9 @@ PHP_FUNCTION( intl_is_failure )
|
||||
{
|
||||
zend_long err_code;
|
||||
|
||||
/* Parse parameters. */
|
||||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "l",
|
||||
&err_code ) == FAILURE )
|
||||
{
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_LONG(err_code)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
RETURN_BOOL( U_FAILURE( err_code ) );
|
||||
}
|
||||
@@ -68,12 +61,9 @@ PHP_FUNCTION( intl_error_name )
|
||||
{
|
||||
zend_long err_code;
|
||||
|
||||
/* Parse parameters. */
|
||||
if( zend_parse_parameters( ZEND_NUM_ARGS(), "l",
|
||||
&err_code ) == FAILURE )
|
||||
{
|
||||
RETURN_THROWS();
|
||||
}
|
||||
ZEND_PARSE_PARAMETERS_START(1, 1)
|
||||
Z_PARAM_LONG(err_code)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
RETURN_STRING( (char*)u_errorName( err_code ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user