@@ -836,7 +836,7 @@ U_CFUNC PHP_FUNCTION(locale_get_display_keyword_value)
836836 /* {{{ return an associative array containing keyword-value
837837 * pairs for this locale. The keys are keys to the array (doh!)
838838 */
839- U_CFUNC PHP_FUNCTION ( locale_get_keywords )
839+ PHP_INTL_FUNCTION_WITH_ERROR_RESET ( locale_get_keywords)
840840{
841841 UEnumeration* e = NULL ;
842842 UErrorCode status = U_ZERO_ERROR ;
@@ -847,7 +847,6 @@ U_CFUNC PHP_FUNCTION( locale_get_keywords )
847847 char * loc_name = NULL ;
848848 size_t loc_name_len = 0 ;
849849
850- intl_error_reset ( NULL );
851850
852851 ZEND_PARSE_PARAMETERS_START (1 , 1 )
853852 Z_PARAM_PATH (loc_name, loc_name_len)
@@ -1051,15 +1050,14 @@ static int handleAppendResult( int result, smart_str* loc_name)
10511050* }}} */
10521051/* {{{ Creates a locale by combining the parts of locale-ID passed
10531052* }}} */
1054- U_CFUNC PHP_FUNCTION (locale_compose)
1053+ PHP_INTL_FUNCTION_WITH_ERROR_RESET (locale_compose)
10551054{
10561055 smart_str loc_name_s = {NULL , 0 };
10571056 smart_str *loc_name = &loc_name_s;
10581057 zval* arr = NULL ;
10591058 HashTable* hash_arr = NULL ;
10601059 int result = 0 ;
10611060
1062- intl_error_reset ( NULL );
10631061
10641062 ZEND_PARSE_PARAMETERS_START (1 , 1 )
10651063 Z_PARAM_ARRAY (arr)
@@ -1232,13 +1230,12 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, const char* key
12321230/* }}} */
12331231
12341232/* {{{ parses a locale-id into an array the different parts of it */
1235- U_CFUNC PHP_FUNCTION (locale_parse)
1233+ PHP_INTL_FUNCTION_WITH_ERROR_RESET (locale_parse)
12361234{
12371235 char * loc_name = NULL ;
12381236 size_t loc_name_len = 0 ;
12391237 int grOffset = 0 ;
12401238
1241- intl_error_reset ( NULL );
12421239
12431240 ZEND_PARSE_PARAMETERS_START (1 , 1 )
12441241 Z_PARAM_PATH (loc_name, loc_name_len)
@@ -1268,7 +1265,7 @@ U_CFUNC PHP_FUNCTION(locale_parse)
12681265/* }}} */
12691266
12701267/* {{{ gets an array containing the list of variants, or null */
1271- U_CFUNC PHP_FUNCTION (locale_get_all_variants)
1268+ PHP_INTL_FUNCTION_WITH_ERROR_RESET (locale_get_all_variants)
12721269{
12731270 char * loc_name = NULL ;
12741271 size_t loc_name_len = 0 ;
@@ -1278,7 +1275,6 @@ U_CFUNC PHP_FUNCTION(locale_get_all_variants)
12781275 zend_string* variant = NULL ;
12791276 char * saved_ptr = NULL ;
12801277
1281- intl_error_reset ( NULL );
12821278
12831279 ZEND_PARSE_PARAMETERS_START (1 , 1 )
12841280 Z_PARAM_PATH (loc_name, loc_name_len)
@@ -1352,7 +1348,7 @@ static int strToMatch(const char* str ,char *retstr)
13521348/* {{{ Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm */
13531349/* }}} */
13541350/* {{{ Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm */
1355- U_CFUNC PHP_FUNCTION (locale_filter_matches)
1351+ PHP_INTL_FUNCTION_WITH_ERROR_RESET (locale_filter_matches)
13561352{
13571353 char * lang_tag = NULL ;
13581354 size_t lang_tag_len = 0 ;
@@ -1372,7 +1368,6 @@ U_CFUNC PHP_FUNCTION(locale_filter_matches)
13721368 bool boolCanonical = 0 ;
13731369 UErrorCode status = U_ZERO_ERROR ;
13741370
1375- intl_error_reset ( NULL );
13761371
13771372 ZEND_PARSE_PARAMETERS_START (2 , 3 )
13781373 Z_PARAM_PATH (lang_tag, lang_tag_len)
@@ -1640,7 +1635,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
16401635/* {{{ Searches the items in $langtag for the best match to the language
16411636* range
16421637*/
1643- U_CFUNC PHP_FUNCTION (locale_lookup)
1638+ PHP_INTL_FUNCTION_WITH_ERROR_RESET (locale_lookup)
16441639{
16451640 zend_string* fallback_loc_str = NULL ;
16461641 char * loc_range = NULL ;
@@ -1651,7 +1646,6 @@ U_CFUNC PHP_FUNCTION(locale_lookup)
16511646 bool boolCanonical = 0 ;
16521647 zend_string* result_str = NULL ;
16531648
1654- intl_error_reset ( NULL );
16551649
16561650 ZEND_PARSE_PARAMETERS_START (2 , 4 )
16571651 Z_PARAM_ARRAY (arr)
0 commit comments