Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions ext/intl/common/common_enum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;

Expand All @@ -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);
Expand All @@ -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) {
Expand All @@ -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);
Expand Down
26 changes: 8 additions & 18 deletions ext/intl/common/common_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}
Expand All @@ -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 ));
}
Expand All @@ -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 ) );
}
Expand All @@ -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 ) );
}
Expand Down