diff options
Diffstat (limited to 'ext/intl/normalizer/normalizer_normalize.c')
| -rwxr-xr-x | ext/intl/normalizer/normalizer_normalize.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c index eb1451410..482c4a01e 100755 --- a/ext/intl/normalizer/normalizer_normalize.c +++ b/ext/intl/normalizer/normalizer_normalize.c @@ -50,8 +50,6 @@ PHP_FUNCTION( normalizer_normalize ) int32_t size_needed; - NORMALIZER_METHOD_INIT_VARS - intl_error_reset( NULL TSRMLS_CC ); /* Parse parameters. */ @@ -59,9 +57,9 @@ PHP_FUNCTION( normalizer_normalize ) &input, &input_len, &form ) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, - "normalizer_normalize: unable to parse input params", 1 TSRMLS_CC ); + "normalizer_normalize: unable to parse input params", 0 TSRMLS_CC ); - RETURN_NULL(); + RETURN_FALSE; } expansion_factor = 1; @@ -80,8 +78,8 @@ PHP_FUNCTION( normalizer_normalize ) break; default: intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, - "normalizer_normalize: illegal normalization form", 1 TSRMLS_CC ); - RETURN_NULL(); + "normalizer_normalize: illegal normalization form", 0 TSRMLS_CC ); + RETURN_FALSE; } /* @@ -97,9 +95,9 @@ PHP_FUNCTION( normalizer_normalize ) intl_error_set_code( NULL, status TSRMLS_CC ); /* Set error messages. */ - intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 1 TSRMLS_CC ); + intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 TSRMLS_CC ); efree( uinput ); - RETURN_NULL(); + RETURN_FALSE; } @@ -136,10 +134,10 @@ PHP_FUNCTION( normalizer_normalize ) /* Bail out if an unexpected error occured. */ if( U_FAILURE(status) ) { /* Set error messages. */ - intl_error_set_custom_msg( NULL,"Error normalizing string", 1 TSRMLS_CC ); + intl_error_set_custom_msg( NULL,"Error normalizing string", 0 TSRMLS_CC ); efree( uret_buf ); efree( uinput ); - RETURN_NULL(); + RETURN_FALSE; } } @@ -154,8 +152,8 @@ PHP_FUNCTION( normalizer_normalize ) if( U_FAILURE( status ) ) { intl_error_set( NULL, status, - "normalizer_normalize: error converting normalized text UTF-8", 1 TSRMLS_CC ); - RETURN_NULL(); + "normalizer_normalize: error converting normalized text UTF-8", 0 TSRMLS_CC ); + RETURN_FALSE; } /* Return it. */ @@ -181,8 +179,6 @@ PHP_FUNCTION( normalizer_is_normalized ) UBool uret = FALSE; - NORMALIZER_METHOD_INIT_VARS - intl_error_reset( NULL TSRMLS_CC ); /* Parse parameters. */ @@ -190,7 +186,7 @@ PHP_FUNCTION( normalizer_is_normalized ) &input, &input_len, &form) == FAILURE ) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, - "normalizer_is_normalized: unable to parse input params", 1 TSRMLS_CC ); + "normalizer_is_normalized: unable to parse input params", 0 TSRMLS_CC ); RETURN_FALSE; } @@ -205,8 +201,8 @@ PHP_FUNCTION( normalizer_is_normalized ) break; default: intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, - "normalizer_normalize: illegal normalization form", 1 TSRMLS_CC ); - RETURN_NULL(); + "normalizer_normalize: illegal normalization form", 0 TSRMLS_CC ); + RETURN_FALSE; } @@ -223,7 +219,7 @@ PHP_FUNCTION( normalizer_is_normalized ) intl_error_set_code( NULL, status TSRMLS_CC ); /* Set error messages. */ - intl_error_set_custom_msg( NULL, "Error converting string to UTF-16.", 1 TSRMLS_CC ); + intl_error_set_custom_msg( NULL, "Error converting string to UTF-16.", 0 TSRMLS_CC ); efree( uinput ); RETURN_FALSE; } @@ -237,7 +233,7 @@ PHP_FUNCTION( normalizer_is_normalized ) /* Bail out if an unexpected error occured. */ if( U_FAILURE(status) ) { /* Set error messages. */ - intl_error_set_custom_msg( NULL,"Error testing if string is the given normalization form.", 1 TSRMLS_CC ); + intl_error_set_custom_msg( NULL,"Error testing if string is the given normalization form.", 0 TSRMLS_CC ); RETURN_FALSE; } |
