Based on https://github.com/php/php-src/commit/975735c02751d9409c4a4757e7b70d217f0f54fe diff --git ext/intl/collator/collator_convert.c ext/intl/collator/collator_convert.c index e989d4c65a..1dcab60461 100644 --- ext/intl/collator/collator_convert.c +++ ext/intl/collator/collator_convert.c @@ -68,7 +68,7 @@ static void collator_convert_hash_item_from_utf8_to_utf16( /* Update current hash item with the converted value. */ MAKE_STD_ZVAL( znew_val ); - ZVAL_STRINGL( znew_val, (char*)new_val, UBYTES(new_val_len), FALSE ); + ZVAL_STRINGL( znew_val, (char*)new_val, UBYTES(new_val_len), false ); if( hashKeyType == HASH_KEY_IS_STRING ) { @@ -113,7 +113,7 @@ static void collator_convert_hash_item_from_utf16_to_utf8( /* Update current hash item with the converted value. */ MAKE_STD_ZVAL( znew_val ); - ZVAL_STRINGL( znew_val, (char*)new_val, new_val_len, FALSE ); + ZVAL_STRINGL( znew_val, (char*)new_val, new_val_len, false ); if( hashKeyType == HASH_KEY_IS_STRING ) { @@ -201,7 +201,7 @@ zval* collator_convert_zstr_utf16_to_utf8( zval* utf16_zval ) php_error( E_WARNING, "Error converting utf16 to utf8 in collator_convert_zval_utf16_to_utf8()" ); ALLOC_INIT_ZVAL( utf8_zval ); - ZVAL_STRINGL( utf8_zval, str, str_len, FALSE ); + ZVAL_STRINGL( utf8_zval, str, str_len, false ); return utf8_zval; } @@ -232,7 +232,7 @@ zval* collator_convert_zstr_utf8_to_utf16( zval* utf8_zval ) /* Set string. */ ALLOC_INIT_ZVAL( zstr ); - ZVAL_STRINGL( zstr, (char*)ustr, UBYTES(ustr_len), FALSE ); + ZVAL_STRINGL( zstr, (char*)ustr, UBYTES(ustr_len), false ); return zstr; } @@ -307,7 +307,7 @@ zval* collator_convert_object_to_string( zval* obj TSRMLS_DC ) zval_dtor( zstr ); /* Set string. */ - ZVAL_STRINGL( zstr, (char*)ustr, UBYTES(ustr_len), FALSE ); + ZVAL_STRINGL( zstr, (char*)ustr, UBYTES(ustr_len), false ); /* Don't free ustr cause it's set in zstr without copy. * efree( ustr ); diff --git ext/intl/collator/collator_error.c ext/intl/collator/collator_error.c index c4e41250a2..d4cef5fa00 100644 --- ext/intl/collator/collator_error.c +++ ext/intl/collator/collator_error.c @@ -80,7 +80,7 @@ PHP_FUNCTION( collator_get_error_message ) /* Return last error message. */ message = intl_error_get_message( COLLATOR_ERROR_P( co ) TSRMLS_CC ); - RETURN_STRING( (char*)message, FALSE ); + RETURN_STRING( (char*)message, false ); } /* }}} */ diff --git ext/intl/collator/collator_locale.c ext/intl/collator/collator_locale.c index b30b021ee8..572a47e936 100644 --- ext/intl/collator/collator_locale.c +++ ext/intl/collator/collator_locale.c @@ -66,7 +66,7 @@ PHP_FUNCTION( collator_get_locale ) COLLATOR_CHECK_STATUS( co, "Error getting locale by type" ); /* Return it. */ - RETVAL_STRINGL( locale_name, strlen(locale_name), TRUE ); + RETVAL_STRINGL( locale_name, strlen(locale_name), true ); } /* }}} */ diff --git ext/intl/collator/collator_sort.c ext/intl/collator/collator_sort.c index 0785111c96..0e1e6de3e3 100644 --- ext/intl/collator/collator_sort.c +++ ext/intl/collator/collator_sort.c @@ -342,7 +342,7 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS ) */ PHP_FUNCTION( collator_sort ) { - collator_sort_internal( TRUE, INTERNAL_FUNCTION_PARAM_PASSTHRU ); + collator_sort_internal( true, INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ @@ -534,7 +534,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys ) */ PHP_FUNCTION( collator_asort ) { - collator_sort_internal( FALSE, INTERNAL_FUNCTION_PARAM_PASSTHRU ); + collator_sort_internal( false, INTERNAL_FUNCTION_PARAM_PASSTHRU ); } /* }}} */ diff --git ext/intl/common/common_error.c ext/intl/common/common_error.c index 282172224c..0973a70316 100644 --- ext/intl/common/common_error.c +++ ext/intl/common/common_error.c @@ -38,7 +38,7 @@ PHP_FUNCTION( intl_get_error_code ) PHP_FUNCTION( intl_get_error_message ) { char* message = intl_error_get_message( NULL TSRMLS_CC ); - RETURN_STRING( message, FALSE ); + RETURN_STRING( message, false ); } /* }}} */ diff --git ext/intl/dateformat/dateformat_attr.c ext/intl/dateformat/dateformat_attr.c index b8c5f25e3a..12eb9b0528 100644 --- ext/intl/dateformat/dateformat_attr.c +++ ext/intl/dateformat/dateformat_attr.c @@ -161,7 +161,7 @@ PHP_FUNCTION( datefmt_get_timezone_id ) INTL_METHOD_CHECK_STATUS(dfo, "Error getting formatter timezone_id." ); if( dfo->timezone_id ){ - RETURN_STRING((char*)dfo->timezone_id, TRUE ); + RETURN_STRING((char*)dfo->timezone_id, true ); }else{ RETURN_NULL(); } @@ -212,7 +212,7 @@ PHP_FUNCTION( datefmt_get_pattern ) UChar value_buf[64]; int length = USIZE( value_buf ); UChar* value = value_buf; - zend_bool is_pattern_localized =FALSE; + zend_bool is_pattern_localized = false; DATE_FORMAT_METHOD_INIT_VARS; @@ -255,7 +255,7 @@ PHP_FUNCTION( datefmt_set_pattern ) int value_len = 0; int slength = 0; UChar* svalue = NULL; - zend_bool is_pattern_localized =FALSE; + zend_bool is_pattern_localized = false; DATE_FORMAT_METHOD_INIT_VARS; @@ -351,7 +351,7 @@ PHP_FUNCTION( datefmt_is_lenient ) */ PHP_FUNCTION( datefmt_set_lenient ) { - zend_bool isLenient = FALSE; + zend_bool isLenient = false; DATE_FORMAT_METHOD_INIT_VARS; diff --git ext/intl/dateformat/dateformat_format.c ext/intl/dateformat/dateformat_format.c index 4d03d924c8..47e3fb20a1 100644 --- ext/intl/dateformat/dateformat_format.c +++ ext/intl/dateformat/dateformat_format.c @@ -90,7 +90,7 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo, HashTable* ha long wday =0; long yday =0; long mday =0; - UBool isInDST = FALSE; + UBool isInDST = false; UCalendar *pcal; /* Fetch values from the incoming array */ diff --git ext/intl/locale/locale_methods.c ext/intl/locale/locale_methods.c index 3bb5648356..0e03f119a9 100644 --- ext/intl/locale/locale_methods.c +++ ext/intl/locale/locale_methods.c @@ -88,14 +88,14 @@ static const char * const LOC_PREFERRED_GRANDFATHERED[] = { NULL }; -/*returns TRUE if a is an ID separator FALSE otherwise*/ +/* returns true if a is an ID separator, false otherwise */ #define isIDSeparator(a) (a == '_' || a == '-') #define isKeywordSeparator(a) (a == '@' ) #define isEndOfTag(a) (a == '\0' ) #define isPrefixLetter(a) ((a=='x')||(a=='X')||(a=='i')||(a=='I')) -/*returns TRUE if one of the special prefixes is here (s=string) +/*returns true if one of the special prefixes is here (s=string) 'x-' or 'i-' */ #define isIDPrefix(s) (isPrefixLetter(s[0])&&isIDSeparator(s[1])) #define isKeywordPrefix(s) ( isKeywordSeparator(s[0]) ) @@ -214,7 +214,7 @@ PHP_NAMED_FUNCTION(zif_locale_get_default) if( INTL_G(default_locale) == NULL ) { INTL_G(default_locale) = pestrdup( uloc_getDefault(), 1); } - RETURN_STRING( INTL_G(default_locale), TRUE ); + RETURN_STRING( INTL_G(default_locale), true ); } /* }}} */ @@ -406,12 +406,12 @@ static void get_icu_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) if( tag_value){ efree( tag_value); } - RETURN_STRING( empty_result , TRUE); + RETURN_STRING( empty_result , true); } /* value found */ if( tag_value){ - RETURN_STRING( tag_value , FALSE); + RETURN_STRING( tag_value , false); } /* Error encountered while fetching the value */ @@ -596,7 +596,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME RETURN_FALSE; } - RETVAL_STRINGL( utf8value, utf8value_len , FALSE); + RETVAL_STRINGL( utf8value, utf8value_len , false); } /* }}} */ @@ -1057,11 +1057,11 @@ static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS } cur_key_name = (char*)ecalloc( 25, 25); sprintf( cur_key_name , "%s%d", key_name , cnt++); - add_assoc_string( hash_arr, cur_key_name , token ,TRUE ); + add_assoc_string( hash_arr, cur_key_name , token ,true ); /* tokenize on the "_" or "-" and stop at singleton if any */ while( (token = php_strtok_r(NULL , DELIMITER , &last_ptr)) && (strlen(token)>1) ){ sprintf( cur_key_name , "%s%d", key_name , cnt++); - add_assoc_string( hash_arr, cur_key_name , token , TRUE ); + add_assoc_string( hash_arr, cur_key_name , token , true ); } /* if( strcmp(key_name, LOC_PRIVATE_TAG) == 0 ){ @@ -1070,7 +1070,7 @@ static int add_array_entry(char* loc_name, zval* hash_arr, char* key_name TSRMLS } } else { if( result == 1 ){ - add_assoc_string( hash_arr, key_name , key_value , TRUE ); + add_assoc_string( hash_arr, key_name , key_value , true ); cur_result = 1; } } @@ -1117,7 +1117,7 @@ PHP_FUNCTION(locale_parse) grOffset = findOffset( LOC_GRANDFATHERED , loc_name ); if( grOffset >= 0 ){ - add_assoc_string( return_value , LOC_GRANDFATHERED_LANG_TAG , estrdup(loc_name) ,FALSE ); + add_assoc_string( return_value , LOC_GRANDFATHERED_LANG_TAG , estrdup(loc_name) ,false ); } else{ /* Not grandfathered */ @@ -1174,10 +1174,10 @@ PHP_FUNCTION(locale_get_all_variants) if( result > 0 && variant){ /* Tokenize on the "_" or "-" */ token = php_strtok_r( variant , DELIMITER , &saved_ptr); - add_next_index_stringl( return_value, token , strlen(token) ,TRUE ); + add_next_index_stringl( return_value, token , strlen(token) ,true ); /* tokenize on the "_" or "-" and stop at singleton if any */ while( (token = php_strtok_r(NULL , DELIMITER, &saved_ptr)) && (strlen(token)>1) ){ - add_next_index_stringl( return_value, token , strlen(token) ,TRUE ); + add_next_index_stringl( return_value, token , strlen(token) ,true ); } } if( variant ){ diff --git ext/intl/normalizer/normalizer_normalize.c ext/intl/normalizer/normalizer_normalize.c index f46285e9d9..c9a1723f6a 100644 --- ext/intl/normalizer/normalizer_normalize.c +++ ext/intl/normalizer/normalizer_normalize.c @@ -159,7 +159,7 @@ PHP_FUNCTION( normalizer_normalize ) } /* Return it. */ - RETVAL_STRINGL( ret_buf, ret_len, FALSE ); + RETVAL_STRINGL( ret_buf, ret_len, false ); } /* }}} */ @@ -179,7 +179,7 @@ PHP_FUNCTION( normalizer_is_normalized ) int uinput_len = 0; UErrorCode status = U_ZERO_ERROR; - UBool uret = FALSE; + UBool uret = false; intl_error_reset( NULL TSRMLS_CC );