Based on https://github.com/php/php-src/commit/975735c02751d9409c4a4757e7b70d217f0f54fe diff --git ext/intl/breakiterator/codepointiterator_internal.cpp ext/intl/breakiterator/codepointiterator_internal.cpp index bf9239d531..fcb258b89b 100644 --- ext/intl/breakiterator/codepointiterator_internal.cpp +++ ext/intl/breakiterator/codepointiterator_internal.cpp @@ -55,7 +55,7 @@ CodePointBreakIterator& CodePointBreakIterator::operator=(const CodePointBreakIt return *this; } - this->fText = utext_clone(this->fText, that.fText, FALSE, TRUE, &uec); + this->fText = utext_clone(this->fText, that.fText, false, true, &uec); //don't bother copying the character iterator, getText() is deprecated clearCurrentCharIter(); @@ -75,17 +75,17 @@ CodePointBreakIterator::~CodePointBreakIterator() UBool CodePointBreakIterator::operator==(const BreakIterator& that) const { if (typeid(*this) != typeid(that)) { - return FALSE; + return false; } const CodePointBreakIterator& that2 = static_cast(that); if (!utext_equals(this->fText, that2.fText)) { - return FALSE; + return false; } - return TRUE; + return true; } CodePointBreakIterator* CodePointBreakIterator::clone(void) const @@ -106,7 +106,7 @@ CharacterIterator& CodePointBreakIterator::getText(void) const UText *CodePointBreakIterator::getUText(UText *fillIn, UErrorCode &status) const { - return utext_clone(fillIn, this->fText, FALSE, TRUE, &status); + return utext_clone(fillIn, this->fText, false, true, &status); } void CodePointBreakIterator::setText(const UnicodeString &text) @@ -125,7 +125,7 @@ void CodePointBreakIterator::setText(UText *text, UErrorCode &status) return; } - this->fText = utext_clone(this->fText, text, FALSE, TRUE, &status); + this->fText = utext_clone(this->fText, text, false, true, &status); clearCurrentCharIter(); } @@ -277,7 +277,7 @@ CodePointBreakIterator &CodePointBreakIterator::refreshInputText(UText *input, U } int64_t pos = utext_getNativeIndex(this->fText); - this->fText = utext_clone(this->fText, input, FALSE, TRUE, &status); + this->fText = utext_clone(this->fText, input, false, true, &status); if (U_FAILURE(status)) { return *this; } diff --git ext/intl/collator/collator_convert.c ext/intl/collator/collator_convert.c index 2a3ac10fbf..7850adfea2 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 04a24f013e..e04dba0405 100644 --- ext/intl/collator/collator_sort.c +++ ext/intl/collator/collator_sort.c @@ -343,7 +343,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 ); } /* }}} */ @@ -535,7 +535,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 a0ee7c145f..9671b67f01 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 bf6b544667..a8f5d8c637 100644 --- ext/intl/dateformat/dateformat_attr.c +++ ext/intl/dateformat/dateformat_attr.c @@ -88,7 +88,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; @@ -131,7 +131,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; @@ -227,7 +227,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/locale/locale_methods.c ext/intl/locale/locale_methods.c index 39d80d524a..7c098f2955 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]) ) @@ -211,7 +211,7 @@ static int getSingletonPos(const char* str) Get default locale */ PHP_NAMED_FUNCTION(zif_locale_get_default) { - RETURN_STRING( intl_locale_get_default( TSRMLS_C ), TRUE ); + RETURN_STRING( intl_locale_get_default( TSRMLS_C ), true ); } /* }}} */ @@ -409,12 +409,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 */ @@ -599,7 +599,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); } /* }}} */ @@ -1062,11 +1062,11 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name } 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 ){ @@ -1075,7 +1075,7 @@ static int add_array_entry(const char* loc_name, zval* hash_arr, char* key_name } } 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; } } @@ -1124,7 +1124,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 */ @@ -1182,10 +1182,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 ); diff --git ext/intl/timezone/timezone_class.cpp ext/intl/timezone/timezone_class.cpp index 374b163851..963bb1cd80 100644 --- ext/intl/timezone/timezone_class.cpp +++ ext/intl/timezone/timezone_class.cpp @@ -315,7 +315,7 @@ static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp TSRMLS_DC) int32_t rawOffset, dstOffset; UDate now = Calendar::getNow(); - tz->getOffset(now, FALSE, rawOffset, dstOffset, uec); + tz->getOffset(now, false, rawOffset, dstOffset, uec); if (U_FAILURE(uec)) { return Z_ARRVAL(zv); } diff --git ext/intl/timezone/timezone_methods.cpp ext/intl/timezone/timezone_methods.cpp index 9ca6b44c89..20a9847a61 100644 --- ext/intl/timezone/timezone_methods.cpp +++ ext/intl/timezone/timezone_methods.cpp @@ -92,7 +92,7 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone) RETURN_NULL(); } - tz = timezone_convert_datetimezone(tzobj->type, tzobj, FALSE, NULL, + tz = timezone_convert_datetimezone(tzobj->type, tzobj, false, NULL, "intltz_from_date_time_zone" TSRMLS_CC); if (tz == NULL) { RETURN_NULL();