com php-src: Use true/false instead of TRUE/FALSE in intl: build/php.m4 ext/intl/breakiterator/codepointiterator_internal.cpp ext
/intl/collator/collator_sort.c ext/intl/dateformat/datefo rmat_attr.c ext/intl/locale/locale_methods.c ext/in tl/normalizer/normalizer_normalize.c
ext/intl/timezone/ti mezone_class.cpp ext/intl/timezone/timezone_methods.c pp
| From: | Nikita Popov | Date: | Mon, 09 Nov 2020 13:44:11 +0000 |
| Subject: | com php-src: Use true/false instead of TRUE/FALSE in intl: build/php.m4 ext/intl/breakiterator/codepointiterator_internal.cpp ext /intl/collator/collator_sort.c ext/intl/dateformat/datefo rmat_attr.c ext/intl/locale/locale_methods.c ext/in tl/normalizer/normalizer_normalize.c ext/intl/timezone/ti mezone_class.cpp ext/intl/timezone/timezone_methods.c pp |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114096@lists.php.net to get a copy of this message | ||
Commit: 975735c02751d9409c4a4757e7b70d217f0f54fe
Author: Nikita Popov <nikita.ppv@gmail.com> Mon, 9 Nov 2020 14:44:11 +0100
Parents: 4cd393453adbb0ec09e7064c572634e739aa2956
Branches: PHP-8.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=975735c02751d9409c4a4757e7b70d217f0f54fe
Log:
Use true/false instead of TRUE/FALSE in intl
And drop the U_DEFINE_TRUE_AND_FALSE flag.
Changed paths:
M build/php.m4
M ext/intl/breakiterator/codepointiterator_internal.cpp
M ext/intl/collator/collator_sort.c
M ext/intl/dateformat/dateformat_attr.c
M ext/intl/locale/locale_methods.c
M ext/intl/normalizer/normalizer_normalize.c
M ext/intl/timezone/timezone_class.cpp
M ext/intl/timezone/timezone_methods.cpp
Diff:
diff --git a/build/php.m4 b/build/php.m4
index 9868c046a63..16c5e25fbaa 100644
--- a/build/php.m4
+++ b/build/php.m4
@@ -1893,8 +1893,6 @@ AC_DEFUN([PHP_SETUP_ICU],[
if test "$PKG_CONFIG icu-io --atleast-version=60"; then
ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
fi
-
- ICU_CFLAGS="$ICU_CFLAGS -DU_DEFINE_FALSE_AND_TRUE=1"
])
dnl
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp
b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 082c02d8b2d..754e0b01d60 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -56,7 +56,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();
@@ -76,17 +76,17 @@ CodePointBreakIterator::~CodePointBreakIterator()
UBool CodePointBreakIterator::operator==(const BreakIterator& that) const
{
if (typeid(*this) != typeid(that)) {
- return FALSE;
+ return false;
}
const CodePointBreakIterator& that2 =
static_cast<const CodePointBreakIterator&>(that);
if (!utext_equals(this->fText, that2.fText)) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
CodePointBreakIterator* CodePointBreakIterator::clone(void) const
@@ -107,7 +107,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)
@@ -126,7 +126,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();
}
@@ -278,7 +278,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 a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index b2da7e16fe2..5989ef42b2e 100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
@@ -312,7 +312,7 @@ static void collator_sort_internal( int renumber, INTERNAL_FUNCTION_PARAMETERS )
/* {{{ Sort array using specified collator. */
PHP_FUNCTION( collator_sort )
{
- collator_sort_internal( TRUE, INTERNAL_FUNCTION_PARAM_PASSTHRU );
+ collator_sort_internal( true, INTERNAL_FUNCTION_PARAM_PASSTHRU );
}
/* }}} */
@@ -495,7 +495,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
/* {{{ Sort array using specified collator, maintaining index association. */
PHP_FUNCTION( collator_asort )
{
- collator_sort_internal( FALSE, INTERNAL_FUNCTION_PARAM_PASSTHRU );
+ collator_sort_internal( false, INTERNAL_FUNCTION_PARAM_PASSTHRU );
}
/* }}} */
diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c
index 7f67afe5b3c..2d2dbdfb6cc 100644
--- a/ext/intl/dateformat/dateformat_attr.c
+++ b/ext/intl/dateformat/dateformat_attr.c
@@ -69,7 +69,7 @@ PHP_FUNCTION( datefmt_get_pattern )
UChar value_buf[64];
uint32_t 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;
@@ -106,7 +106,7 @@ PHP_FUNCTION( datefmt_set_pattern )
size_t value_len = 0;
int32_t slength = 0;
UChar* svalue = NULL;
- zend_bool is_pattern_localized =FALSE;
+ zend_bool is_pattern_localized = false;
DATE_FORMAT_METHOD_INIT_VARS;
@@ -184,7 +184,7 @@ PHP_FUNCTION( datefmt_is_lenient )
/* {{{ Set formatter lenient. */
PHP_FUNCTION( datefmt_set_lenient )
{
- zend_bool isLenient = FALSE;
+ zend_bool isLenient = false;
DATE_FORMAT_METHOD_INIT_VARS;
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index 466dafadace..9357475f551 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -83,14 +83,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]) )
diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c
index 5eca379c990..edeeea7f4be 100644
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -69,7 +69,7 @@ static UBool intl_is_normalized(zend_long form, const UChar *uinput, int32_t uin
const UNormalizer2 *norm = intl_get_normalizer(form, err);
if(U_FAILURE(*err)) {
- return FALSE;
+ return false;
}
return unorm2_isNormalized(norm, uinput, uinput_len, err);
@@ -226,7 +226,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 );
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
index 63d5b057467..f5749fd621d 100644
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -327,7 +327,7 @@ static HashTable *TimeZone_get_debug_info(zend_object *object, int *is_temp)
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 debug_info;
}
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 6516bb6ff79..3a2d28ada6f 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -89,7 +89,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");
if (tz == NULL) {
RETURN_NULL();