1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Update ICU to 75.1

This commit is contained in:
bruvzg
2024-05-14 11:41:19 +03:00
parent 557f63d037
commit e74fea2864
129 changed files with 8033 additions and 7861 deletions

View File

@@ -146,14 +146,13 @@ public:
* will return distinct unequal values.
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override = 0;
virtual UClassID getDynamicClassID() const override = 0;
/**
* Return a CharacterIterator over the text being analyzed.
* @stable ICU 2.0
*/
virtual CharacterIterator& getText(void) const = 0;
virtual CharacterIterator& getText() const = 0;
/**
* Get a UText for the text being analyzed.
@@ -228,14 +227,14 @@ public:
* @return The offset of the beginning of the text, zero.
* @stable ICU 2.0
*/
virtual int32_t first(void) = 0;
virtual int32_t first() = 0;
/**
* Set the iterator position to the index immediately BEYOND the last character in the text being scanned.
* @return The index immediately BEYOND the last character in the text being scanned.
* @stable ICU 2.0
*/
virtual int32_t last(void) = 0;
virtual int32_t last() = 0;
/**
* Set the iterator position to the boundary preceding the current boundary.
@@ -243,7 +242,7 @@ public:
* boundaries have been returned.
* @stable ICU 2.0
*/
virtual int32_t previous(void) = 0;
virtual int32_t previous() = 0;
/**
* Advance the iterator to the boundary following the current boundary.
@@ -251,14 +250,14 @@ public:
* boundaries have been returned.
* @stable ICU 2.0
*/
virtual int32_t next(void) = 0;
virtual int32_t next() = 0;
/**
* Return character index of the current iterator position within the text.
* @return The boundary most recently returned.
* @stable ICU 2.0
*/
virtual int32_t current(void) const = 0;
virtual int32_t current() const = 0;
/**
* Advance the iterator to the first boundary following the specified offset.
@@ -530,7 +529,7 @@ public:
* must be closed by an explicit call to the destructor (not delete).
* @deprecated ICU 52. Always delete the BreakIterator.
*/
inline UBool isBufferClone(void);
inline UBool isBufferClone();
#endif /* U_HIDE_DEPRECATED_API */
@@ -575,7 +574,7 @@ public:
* @return a StringEnumeration over the locales available at the time of the call
* @stable ICU 2.4
*/
static StringEnumeration* U_EXPORT2 getAvailableLocales(void);
static StringEnumeration* U_EXPORT2 getAvailableLocales();
#endif
/**

View File

@@ -128,9 +128,10 @@ public:
* @param skipZeros determine if skip zeros
* @param result the results in a set.
* @param status Fill-in parameter which receives the status of this operation.
* @param depth depth of the call.
* @internal
*/
static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status);
static void U_EXPORT2 permute(UnicodeString &source, UBool skipZeros, Hashtable *result, UErrorCode &status, int32_t depth=0);
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -182,8 +183,8 @@ private:
// transient fields
UnicodeString buffer;
const Normalizer2 &nfd;
const Normalizer2Impl &nfcImpl;
const Normalizer2 *nfd;
const Normalizer2Impl *nfcImpl;
// we have a segment, in NFD. Find all the strings that are canonically equivalent to it.
UnicodeString *getEquivalents(const UnicodeString &segment, int32_t &result_len, UErrorCode &status); //private String[] getEquivalents(String segment)

View File

@@ -133,8 +133,8 @@ public:
* @return the hash code.
* @stable ICU 2.0
*/
virtual int32_t hashCode(void) const = 0;
virtual int32_t hashCode() const = 0;
/**
* Returns a UClassID for this ForwardCharacterIterator ("poor man's
* RTTI").<P> Despite the fact that this function is public,
@@ -142,8 +142,8 @@ public:
* @return a UClassID for this ForwardCharacterIterator
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override = 0;
virtual UClassID getDynamicClassID() const override = 0;
/**
* Gets the current code unit for returning and advances to the next code unit
* in the iteration range
@@ -152,8 +152,8 @@ public:
* @return the current code unit.
* @stable ICU 2.0
*/
virtual char16_t nextPostInc(void) = 0;
virtual char16_t nextPostInc() = 0;
/**
* Gets the current code point for returning and advances to the next code point
* in the iteration range
@@ -162,8 +162,8 @@ public:
* @return the current code point.
* @stable ICU 2.0
*/
virtual UChar32 next32PostInc(void) = 0;
virtual UChar32 next32PostInc() = 0;
/**
* Returns false if there are no more code units or code points
* at or after the current position in the iteration range.
@@ -389,7 +389,7 @@ public:
* @return the first code unit in its iteration range.
* @stable ICU 2.0
*/
virtual char16_t first(void) = 0;
virtual char16_t first() = 0;
/**
* Sets the iterator to refer to the first code unit in its
@@ -399,7 +399,7 @@ public:
* @return the first code unit in its iteration range.
* @stable ICU 2.0
*/
virtual char16_t firstPostInc(void);
virtual char16_t firstPostInc();
/**
* Sets the iterator to refer to the first code point in its
@@ -410,7 +410,7 @@ public:
* @return the first code point in its iteration range.
* @stable ICU 2.0
*/
virtual UChar32 first32(void) = 0;
virtual UChar32 first32() = 0;
/**
* Sets the iterator to refer to the first code point in its
@@ -420,7 +420,7 @@ public:
* @return the first code point in its iteration range.
* @stable ICU 2.0
*/
virtual UChar32 first32PostInc(void);
virtual UChar32 first32PostInc();
/**
* Sets the iterator to refer to the first code unit or code point in its
@@ -438,8 +438,8 @@ public:
* @return the last code unit.
* @stable ICU 2.0
*/
virtual char16_t last(void) = 0;
virtual char16_t last() = 0;
/**
* Sets the iterator to refer to the last code point in its
* iteration range, and returns that code unit.
@@ -447,7 +447,7 @@ public:
* @return the last code point.
* @stable ICU 2.0
*/
virtual UChar32 last32(void) = 0;
virtual UChar32 last32() = 0;
/**
* Sets the iterator to the end of its iteration range, just behind
@@ -486,15 +486,15 @@ public:
* @return the current code unit.
* @stable ICU 2.0
*/
virtual char16_t current(void) const = 0;
virtual char16_t current() const = 0;
/**
* Returns the code point the iterator currently refers to.
* @return the current code point.
* @stable ICU 2.0
*/
virtual UChar32 current32(void) const = 0;
virtual UChar32 current32() const = 0;
/**
* Advances to the next code unit in the iteration range
* (toward endIndex()), and returns that code unit. If there are
@@ -502,8 +502,8 @@ public:
* @return the next code unit.
* @stable ICU 2.0
*/
virtual char16_t next(void) = 0;
virtual char16_t next() = 0;
/**
* Advances to the next code point in the iteration range
* (toward endIndex()), and returns that code point. If there are
@@ -514,8 +514,8 @@ public:
* @return the next code point.
* @stable ICU 2.0
*/
virtual UChar32 next32(void) = 0;
virtual UChar32 next32() = 0;
/**
* Advances to the previous code unit in the iteration range
* (toward startIndex()), and returns that code unit. If there are
@@ -523,7 +523,7 @@ public:
* @return the previous code unit.
* @stable ICU 2.0
*/
virtual char16_t previous(void) = 0;
virtual char16_t previous() = 0;
/**
* Advances to the previous code point in the iteration range
@@ -532,7 +532,7 @@ public:
* @return the previous code point.
* @stable ICU 2.0
*/
virtual UChar32 previous32(void) = 0;
virtual UChar32 previous32() = 0;
/**
* Returns false if there are no more code units or code points
@@ -555,8 +555,8 @@ public:
* object of the character returned by first().
* @stable ICU 2.0
*/
inline int32_t startIndex(void) const;
inline int32_t startIndex() const;
/**
* Returns the numeric index in the underlying text-storage
* object of the position immediately BEYOND the character
@@ -566,8 +566,8 @@ public:
* returned by last().
* @stable ICU 2.0
*/
inline int32_t endIndex(void) const;
inline int32_t endIndex() const;
/**
* Returns the numeric index in the underlying text-storage
* object of the character the iterator currently refers to
@@ -576,7 +576,7 @@ public:
* the character the iterator currently refers to
* @stable ICU 2.0
*/
inline int32_t getIndex(void) const;
inline int32_t getIndex() const;
/**
* Returns the length of the entire text in the underlying
@@ -708,22 +708,22 @@ CharacterIterator::setToEnd() {
}
inline int32_t
CharacterIterator::startIndex(void) const {
CharacterIterator::startIndex() const {
return begin;
}
inline int32_t
CharacterIterator::endIndex(void) const {
CharacterIterator::endIndex() const {
return end;
}
inline int32_t
CharacterIterator::getIndex(void) const {
CharacterIterator::getIndex() const {
return pos;
}
inline int32_t
CharacterIterator::getLength(void) const {
CharacterIterator::getLength() const {
return textLength;
}

View File

@@ -143,6 +143,11 @@
* <td>icu::MessageFormat</td>
* </tr>
* <tr>
* <td>Message Formatting 2<br/>(technology preview)</td>
* <td>(no C API)</td>
* <td>icu::message2::MessageFormatter</td>
* </tr>
* <tr>
* <td>List Formatting</td>
* <td>ulistformatter.h</td>
* <td>icu::ListFormatter</td>

View File

@@ -76,7 +76,7 @@ public:
* @return The class ID for all objects of this class.
* @stable ICU 4.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();
/**
* Returns a unique class ID POLYMORPHICALLY. Pure virtual override. This
@@ -89,9 +89,8 @@ public:
* other classes have different class IDs.
* @stable ICU 4.0
*/
virtual UClassID getDynamicClassID(void) const override;
virtual UClassID getDynamicClassID() const override;
/**
* Copy constructor.
* @stable ICU 4.0

View File

@@ -11,6 +11,8 @@
#if U_SHOW_CPLUSPLUS_API
#include <optional>
#include "unicode/locid.h"
#include "unicode/stringpiece.h"
#include "unicode/uobject.h"
@@ -133,10 +135,10 @@ U_NAMESPACE_BEGIN
struct LSR;
class LikelySubtags;
class LocaleDistance;
class LocaleLsrIterator;
class UVector;
class XLikelySubtags;
/**
* Immutable class that picks the best match between a user's desired locales and
@@ -678,9 +680,9 @@ private:
int32_t putIfAbsent(const LSR &lsr, int32_t i, int32_t suppLength, UErrorCode &errorCode);
int32_t getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, UErrorCode &errorCode) const;
std::optional<int32_t> getBestSuppIndex(LSR desiredLSR, LocaleLsrIterator *remainingIter, UErrorCode &errorCode) const;
const XLikelySubtags &likelySubtags;
const LikelySubtags &likelySubtags;
const LocaleDistance &localeDistance;
int32_t thresholdDistance;
int32_t demotionPerDesiredLocale;

View File

@@ -162,11 +162,11 @@ protected:
T *ptr;
private:
// No comparison operators with other LocalPointerBases.
bool operator==(const LocalPointerBase<T> &other);
bool operator!=(const LocalPointerBase<T> &other);
bool operator==(const LocalPointerBase<T> &other) = delete;
bool operator!=(const LocalPointerBase<T> &other) = delete;
// No ownership sharing: No copy constructor, no assignment operator.
LocalPointerBase(const LocalPointerBase<T> &other);
void operator=(const LocalPointerBase<T> &other);
LocalPointerBase(const LocalPointerBase<T> &other) = delete;
void operator=(const LocalPointerBase<T> &other) = delete;
};
/**
@@ -548,46 +548,60 @@ public:
* @stable ICU 4.4
*/
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction) \
class LocalPointerClassName : public LocalPointerBase<Type> { \
public: \
using LocalPointerBase<Type>::operator*; \
using LocalPointerBase<Type>::operator->; \
explicit LocalPointerClassName(Type *p=nullptr) : LocalPointerBase<Type>(p) {} \
LocalPointerClassName(LocalPointerClassName &&src) noexcept \
: LocalPointerBase<Type>(src.ptr) { \
src.ptr=nullptr; \
} \
/* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \
explicit LocalPointerClassName(std::unique_ptr<Type, decltype(&closeFunction)> &&p) \
: LocalPointerBase<Type>(p.release()) {} \
~LocalPointerClassName() { if (ptr != nullptr) { closeFunction(ptr); } } \
LocalPointerClassName &operator=(LocalPointerClassName &&src) noexcept { \
if (ptr != nullptr) { closeFunction(ptr); } \
LocalPointerBase<Type>::ptr=src.ptr; \
src.ptr=nullptr; \
return *this; \
} \
/* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */ \
LocalPointerClassName &operator=(std::unique_ptr<Type, decltype(&closeFunction)> &&p) { \
adoptInstead(p.release()); \
return *this; \
} \
void swap(LocalPointerClassName &other) noexcept { \
Type *temp=LocalPointerBase<Type>::ptr; \
LocalPointerBase<Type>::ptr=other.ptr; \
other.ptr=temp; \
} \
friend inline void swap(LocalPointerClassName &p1, LocalPointerClassName &p2) noexcept { \
p1.swap(p2); \
} \
void adoptInstead(Type *p) { \
if (ptr != nullptr) { closeFunction(ptr); } \
ptr=p; \
} \
operator std::unique_ptr<Type, decltype(&closeFunction)> () && { \
return std::unique_ptr<Type, decltype(&closeFunction)>(LocalPointerBase<Type>::orphan(), closeFunction); \
} \
using LocalPointerClassName = internal::LocalOpenPointer<Type, closeFunction>
#ifndef U_IN_DOXYGEN
namespace internal {
/**
* Implementation, do not use directly: use U_DEFINE_LOCAL_OPEN_POINTER.
*
* @see U_DEFINE_LOCAL_OPEN_POINTER
* @internal
*/
template <typename Type, auto closeFunction>
class LocalOpenPointer : public LocalPointerBase<Type> {
using LocalPointerBase<Type>::ptr;
public:
using LocalPointerBase<Type>::operator*;
using LocalPointerBase<Type>::operator->;
explicit LocalOpenPointer(Type *p=nullptr) : LocalPointerBase<Type>(p) {}
LocalOpenPointer(LocalOpenPointer &&src) noexcept
: LocalPointerBase<Type>(src.ptr) {
src.ptr=nullptr;
}
/* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */
explicit LocalOpenPointer(std::unique_ptr<Type, decltype(closeFunction)> &&p)
: LocalPointerBase<Type>(p.release()) {}
~LocalOpenPointer() { if (ptr != nullptr) { closeFunction(ptr); } }
LocalOpenPointer &operator=(LocalOpenPointer &&src) noexcept {
if (ptr != nullptr) { closeFunction(ptr); }
LocalPointerBase<Type>::ptr=src.ptr;
src.ptr=nullptr;
return *this;
}
/* TODO: Be agnostic of the deleter function signature from the user-provided std::unique_ptr? */
LocalOpenPointer &operator=(std::unique_ptr<Type, decltype(closeFunction)> &&p) {
adoptInstead(p.release());
return *this;
}
void swap(LocalOpenPointer &other) noexcept {
Type *temp=LocalPointerBase<Type>::ptr;
LocalPointerBase<Type>::ptr=other.ptr;
other.ptr=temp;
}
friend inline void swap(LocalOpenPointer &p1, LocalOpenPointer &p2) noexcept {
p1.swap(p2);
}
void adoptInstead(Type *p) {
if (ptr != nullptr) { closeFunction(ptr); }
ptr=p;
}
operator std::unique_ptr<Type, decltype(closeFunction)> () && {
return std::unique_ptr<Type, decltype(closeFunction)>(LocalPointerBase<Type>::orphan(), closeFunction);
}
};
} // namespace internal
#endif
U_NAMESPACE_END

View File

@@ -195,51 +195,50 @@ class UnicodeString;
class U_COMMON_API Locale : public UObject {
public:
/** Useful constant for the Root locale. @stable ICU 4.4 */
static const Locale &U_EXPORT2 getRoot(void);
static const Locale& U_EXPORT2 getRoot();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getEnglish(void);
static const Locale& U_EXPORT2 getEnglish();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getFrench(void);
static const Locale& U_EXPORT2 getFrench();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getGerman(void);
static const Locale& U_EXPORT2 getGerman();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getItalian(void);
static const Locale& U_EXPORT2 getItalian();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getJapanese(void);
static const Locale& U_EXPORT2 getJapanese();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getKorean(void);
static const Locale& U_EXPORT2 getKorean();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getChinese(void);
static const Locale& U_EXPORT2 getChinese();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getSimplifiedChinese(void);
static const Locale& U_EXPORT2 getSimplifiedChinese();
/** Useful constant for this language. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getTraditionalChinese(void);
static const Locale& U_EXPORT2 getTraditionalChinese();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getFrance(void);
static const Locale& U_EXPORT2 getFrance();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getGermany(void);
static const Locale& U_EXPORT2 getGermany();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getItaly(void);
static const Locale& U_EXPORT2 getItaly();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getJapan(void);
static const Locale& U_EXPORT2 getJapan();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getKorea(void);
static const Locale& U_EXPORT2 getKorea();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getChina(void);
static const Locale& U_EXPORT2 getChina();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getPRC(void);
static const Locale& U_EXPORT2 getPRC();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getTaiwan(void);
static const Locale& U_EXPORT2 getTaiwan();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getUK(void);
static const Locale& U_EXPORT2 getUK();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getUS(void);
static const Locale& U_EXPORT2 getUS();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getCanada(void);
static const Locale& U_EXPORT2 getCanada();
/** Useful constant for this country/region. @stable ICU 2.0 */
static const Locale &U_EXPORT2 getCanadaFrench(void);
static const Locale& U_EXPORT2 getCanadaFrench();
/**
* Construct a default locale object, a Locale for the default locale ID.
@@ -274,10 +273,10 @@ public:
* @see uloc_getDefault
* @stable ICU 2.0
*/
Locale( const char * language,
const char * country = 0,
const char * variant = 0,
const char * keywordsAndValues = 0);
Locale(const char* language,
const char* country = nullptr,
const char* variant = nullptr,
const char* keywordsAndValues = nullptr);
/**
* Initializes a Locale object from another Locale object.
@@ -370,7 +369,7 @@ public:
* @system
* @stable ICU 2.0
*/
static const Locale& U_EXPORT2 getDefault(void);
static const Locale& U_EXPORT2 getDefault();
/**
* Sets the default. Normally set once at the beginning of a process,
@@ -518,20 +517,20 @@ public:
* If this Locale is already in the maximal form, or not valid, or there is
* no data available for maximization, the Locale will be unchanged.
*
* For example, "und-Zzzz" cannot be maximized, since there is no
* For example, "sh" cannot be maximized, since there is no
* reasonable maximization.
*
* Examples:
*
* "und_Zzzz" maximizes to "en_Latn_US"
*
* "en" maximizes to "en_Latn_US"
*
* "de" maximizes to "de_Latn_US"
* "de" maximizes to "de_Latn_DE"
*
* "sr" maximizes to "sr_Cyrl_RS"
*
* "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.)
*
* "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.)
* "zh_Hani" maximizes to "zh_Hani_CN"
*
* @param status error information if maximizing this Locale failed.
* If this Locale is not well-formed, the error code is
@@ -792,7 +791,7 @@ public:
* there is no Windows LCID value that corresponds to this locale, returns 0.
* @stable ICU 2.0
*/
uint32_t getLCID(void) const;
uint32_t getLCID() const;
/**
* Returns whether this locale's script is written right-to-left.
@@ -944,7 +943,7 @@ public:
* Generates a hash code for the locale.
* @stable ICU 2.0
*/
int32_t hashCode(void) const;
int32_t hashCode() const;
/**
* Sets the locale to bogus
@@ -961,7 +960,7 @@ public:
* @return false if it is a real locale, true if it is a bogus locale
* @stable ICU 2.1
*/
inline UBool isBogus(void) const;
inline UBool isBogus() const;
/**
* Returns a list of all installed locales.
@@ -1147,7 +1146,7 @@ private:
/**
* Initialize the locale cache for commonly used locales
*/
static Locale *getLocaleCache(void);
static Locale* getLocaleCache();
char language[ULOC_LANG_CAPACITY];
char script[ULOC_SCRIPT_CAPACITY];
@@ -1184,6 +1183,7 @@ Locale::operator!=(const Locale& other) const
template<typename StringClass> inline StringClass
Locale::toLanguageTag(UErrorCode& status) const
{
if (U_FAILURE(status)) { return {}; }
StringClass result;
StringByteSink<StringClass> sink(&result);
toLanguageTag(sink, status);
@@ -1211,7 +1211,7 @@ Locale::getScript() const
inline const char *
Locale::getVariant() const
{
return &baseName[variantBegin];
return fIsBogus ? "" : &baseName[variantBegin];
}
inline const char *
@@ -1223,6 +1223,7 @@ Locale::getName() const
template<typename StringClass, typename OutputIterator> inline void
Locale::getKeywords(OutputIterator iterator, UErrorCode& status) const
{
if (U_FAILURE(status)) { return; }
LocalPointer<StringEnumeration> keys(createKeywords(status));
if (U_FAILURE(status) || keys.isNull()) {
return;
@@ -1240,6 +1241,7 @@ Locale::getKeywords(OutputIterator iterator, UErrorCode& status) const
template<typename StringClass, typename OutputIterator> inline void
Locale::getUnicodeKeywords(OutputIterator iterator, UErrorCode& status) const
{
if (U_FAILURE(status)) { return; }
LocalPointer<StringEnumeration> keys(createUnicodeKeywords(status));
if (U_FAILURE(status) || keys.isNull()) {
return;
@@ -1257,6 +1259,7 @@ Locale::getUnicodeKeywords(OutputIterator iterator, UErrorCode& status) const
template<typename StringClass> inline StringClass
Locale::getKeywordValue(StringPiece keywordName, UErrorCode& status) const
{
if (U_FAILURE(status)) { return {}; }
StringClass result;
StringByteSink<StringClass> sink(&result);
getKeywordValue(keywordName, sink, status);
@@ -1266,6 +1269,7 @@ Locale::getKeywordValue(StringPiece keywordName, UErrorCode& status) const
template<typename StringClass> inline StringClass
Locale::getUnicodeKeywordValue(StringPiece keywordName, UErrorCode& status) const
{
if (U_FAILURE(status)) { return {}; }
StringClass result;
StringByteSink<StringClass> sink(&result);
getUnicodeKeywordValue(keywordName, sink, status);
@@ -1273,7 +1277,7 @@ Locale::getUnicodeKeywordValue(StringPiece keywordName, UErrorCode& status) cons
}
inline UBool
Locale::isBogus(void) const {
Locale::isBogus() const {
return fIsBogus;
}

View File

@@ -466,7 +466,7 @@ public:
* @return the current normalized code point
* @deprecated ICU 56 Use Normalizer2 instead.
*/
UChar32 current(void);
UChar32 current();
/**
* Return the first character in the normalized text.
@@ -476,7 +476,7 @@ public:
* @return the first normalized code point
* @deprecated ICU 56 Use Normalizer2 instead.
*/
UChar32 first(void);
UChar32 first();
/**
* Return the last character in the normalized text.
@@ -486,7 +486,7 @@ public:
* @return the last normalized code point
* @deprecated ICU 56 Use Normalizer2 instead.
*/
UChar32 last(void);
UChar32 last();
/**
* Return the next character in the normalized text.
@@ -502,7 +502,7 @@ public:
* @return the next normalized code point
* @deprecated ICU 56 Use Normalizer2 instead.
*/
UChar32 next(void);
UChar32 next();
/**
* Return the previous character in the normalized text and decrement.
@@ -518,7 +518,7 @@ public:
* @return the previous normalized code point
* @deprecated ICU 56 Use Normalizer2 instead.
*/
UChar32 previous(void);
UChar32 previous();
/**
* Set the iteration position in the input text that is being normalized,
@@ -536,7 +536,7 @@ public:
* This is equivalent to setIndexOnly(startIndex)).
* @deprecated ICU 56 Use Normalizer2 instead.
*/
void reset(void);
void reset();
/**
* Retrieve the current iteration position in the input text that is
@@ -552,7 +552,7 @@ public:
* @return the current index in the input text
* @deprecated ICU 56 Use Normalizer2 instead.
*/
int32_t getIndex(void) const;
int32_t getIndex() const;
/**
* Retrieve the index of the start of the input text. This is the begin index
@@ -562,7 +562,7 @@ public:
* @return the smallest index in the input text where the Normalizer operates
* @deprecated ICU 56 Use Normalizer2 instead.
*/
int32_t startIndex(void) const;
int32_t startIndex() const;
/**
* Retrieve the index of the end of the input text. This is the end index
@@ -574,7 +574,7 @@ public:
* @return the first index in the input text where the Normalizer does not operate
* @deprecated ICU 56 Use Normalizer2 instead.
*/
int32_t endIndex(void) const;
int32_t endIndex() const;
/**
* Returns true when both iterators refer to the same character in the same
@@ -610,7 +610,7 @@ public:
* @return the hash code
* @deprecated ICU 56 Use Normalizer2 instead.
*/
int32_t hashCode(void) const;
int32_t hashCode() const;
//-------------------------------------------------------------------------
// Property access methods
@@ -643,7 +643,7 @@ public:
* @see #setMode
* @deprecated ICU 56 Use Normalizer2 instead.
*/
UNormalizationMode getUMode(void) const;
UNormalizationMode getUMode() const;
/**
* Set options that affect this <code>Normalizer</code>'s operation.
@@ -749,7 +749,7 @@ private:
UBool previousNormalize();
void init();
void clearBuffer(void);
void clearBuffer();
//-------------------------------------------------------------------------
// Private data

View File

@@ -129,7 +129,7 @@ public:
* @return the current index.
* @stable ICU 2.0
*/
inline int32_t getIndex(void) const;
inline int32_t getIndex() const;
/**
* Set the current parse position.
@@ -152,7 +152,7 @@ public:
* error index has not been set.
* @stable ICU 2.0
*/
inline int32_t getErrorIndex(void) const;
inline int32_t getErrorIndex() const;
/**
* ICU "poor man's RTTI", returns a UClassID for this class.

View File

@@ -206,6 +206,17 @@
# define U_PLATFORM U_PF_UNKNOWN
#endif
/**
* \def U_REAL_MSVC
* Defined if the compiler is the real MSVC compiler (and not something like
* Clang setting _MSC_VER in order to compile Windows code that requires it).
* Otherwise undefined.
* @internal
*/
#if (defined(_MSC_VER) && !(defined(__clang__) && __clang__)) || defined(U_IN_DOXYGEN)
# define U_REAL_MSVC
#endif
/**
* \def CYGWINMSVC
* Defined if this is Windows with Cygwin, but using MSVC rather than gcc.
@@ -302,51 +313,6 @@
# define U_PLATFORM_IS_DARWIN_BASED 0
#endif
/**
* \def U_HAVE_STDINT_H
* Defines whether stdint.h is available. It is a C99 standard header.
* We used to include inttypes.h which includes stdint.h but we usually do not need
* the additional definitions from inttypes.h.
* @internal
*/
#ifdef U_HAVE_STDINT_H
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_VER) && _MSC_VER>=1600)
/* Windows Visual Studio 9 and below do not have stdint.h & inttypes.h, but VS 2010 adds them. */
# define U_HAVE_STDINT_H 1
# else
# define U_HAVE_STDINT_H 0
# endif
#elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_STDINT_H 0
#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
/* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */
# define U_HAVE_STDINT_H 0
#else
# define U_HAVE_STDINT_H 1
#endif
/**
* \def U_HAVE_INTTYPES_H
* Defines whether inttypes.h is available. It is a C99 standard header.
* We include inttypes.h where it is available but stdint.h is not.
* @internal
*/
#ifdef U_HAVE_INTTYPES_H
/* Use the predefined value. */
#elif U_PLATFORM == U_PF_SOLARIS
/* Solaris has inttypes.h but not stdint.h. */
# define U_HAVE_INTTYPES_H 1
#elif U_PLATFORM == U_PF_AIX && !defined(_AIX51) && defined(_POWER)
/* PPC AIX <= 4.3 has inttypes.h but not stdint.h. */
# define U_HAVE_INTTYPES_H 1
#else
/* Most platforms have both inttypes.h and stdint.h, or neither. */
# define U_HAVE_INTTYPES_H U_HAVE_STDINT_H
#endif
/*===========================================================================*/
/** @{ Compiler and environment features */
/*===========================================================================*/
@@ -507,6 +473,8 @@
/* Otherwise use the predefined value. */
#elif !defined(__cplusplus)
# define U_CPLUSPLUS_VERSION 0
#elif __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
# define U_CPLUSPLUS_VERSION 17
#elif __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
# define U_CPLUSPLUS_VERSION 14
#elif __cplusplus >= 201103L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201103L)
@@ -754,9 +722,9 @@
/*
* Notes:
* C++11 and C11 require support for UTF-16 literals
* TODO: Fix for plain C. Doesn't work on Mac.
* Doesn't work on Mac C11 (see workaround in ptypes.h).
*/
# if U_CPLUSPLUS_VERSION >= 11 || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
# if defined(__cplusplus) || !U_PLATFORM_IS_DARWIN_BASED
# define U_HAVE_CHAR16_T 1
# else
# define U_HAVE_CHAR16_T 0

View File

@@ -42,89 +42,25 @@
/* NULL, size_t, wchar_t */
#include <stddef.h>
/*
* If all compilers provided all of the C99 headers and types,
* we would just unconditionally #include <stdint.h> here
* and not need any of the stuff after including platform.h.
*/
/* Find out if we have stdint.h etc. */
/* More platform-specific definitions. */
#include "unicode/platform.h"
/*===========================================================================*/
/* Generic data types */
/*===========================================================================*/
/* If your platform does not have the <stdint.h> header, you may
need to edit the typedefs in the #else section below.
Use #if...#else...#endif with predefined compiler macros if possible. */
#if U_HAVE_STDINT_H
/*
* We mostly need <stdint.h> (which defines the standard integer types) but not <inttypes.h>.
* <inttypes.h> includes <stdint.h> and adds the printf/scanf helpers PRId32, SCNx16 etc.
* which we almost never use, plus stuff like imaxabs() which we never use.
*/
#include <stdint.h>
#if U_PLATFORM == U_PF_OS390
/* The features header is needed to get (u)int64_t sometimes. */
#include <features.h>
/* z/OS has <stdint.h>, but some versions are missing uint8_t (APAR PK62248). */
#if !defined(__uint8_t)
#define __uint8_t 1
typedef unsigned char uint8_t;
// C++11 and C11 both specify that the data type char16_t should exist, C++11
// as a keyword and C11 as a typedef in the uchar.h header file, but not all
// implementations (looking at you, Apple, spring 2024) actually do this, so
// ICU4C must detect and deal with that.
#if !defined(__cplusplus) && !defined(U_IN_DOXYGEN)
# if U_HAVE_CHAR16_T
# include <uchar.h>
# else
typedef uint16_t char16_t;
# endif
#endif
#endif /* U_PLATFORM == U_PF_OS390 */
#elif U_HAVE_INTTYPES_H
# include <inttypes.h>
#else /* neither U_HAVE_STDINT_H nor U_HAVE_INTTYPES_H */
/// \cond
#if ! U_HAVE_INT8_T
typedef signed char int8_t;
#endif
#if ! U_HAVE_UINT8_T
typedef unsigned char uint8_t;
#endif
#if ! U_HAVE_INT16_T
typedef signed short int16_t;
#endif
#if ! U_HAVE_UINT16_T
typedef unsigned short uint16_t;
#endif
#if ! U_HAVE_INT32_T
typedef signed int int32_t;
#endif
#if ! U_HAVE_UINT32_T
typedef unsigned int uint32_t;
#endif
#if ! U_HAVE_INT64_T
#ifdef _MSC_VER
typedef signed __int64 int64_t;
#else
typedef signed long long int64_t;
#endif
#endif
#if ! U_HAVE_UINT64_T
#ifdef _MSC_VER
typedef unsigned __int64 uint64_t;
#else
typedef unsigned long long uint64_t;
#endif
#endif
/// \endcond
#endif /* U_HAVE_STDINT_H / U_HAVE_INTTYPES_H */
#endif /* _PTYPES_H */

View File

@@ -44,7 +44,7 @@ class UnhandledEngine;
class UStack;
#ifndef U_HIDE_DRAFT_API
#ifndef U_HIDE_INTERNAL_API
/**
* The ExternalBreakEngine class define an abstract interface for the host environment
* to provide a low level facility to break text for unicode text in script that the text boundary
@@ -103,7 +103,7 @@ class ExternalBreakEngine : public UObject {
int32_t* foundBreaks, int32_t foundBreaksCapacity,
UErrorCode& status) const = 0;
};
#endif /* U_HIDE_DRAFT_API */
#endif /* U_HIDE_INTERNAL_API */
/**
@@ -388,14 +388,14 @@ public:
* @return A hash code
* @stable ICU 2.0
*/
virtual int32_t hashCode(void) const;
virtual int32_t hashCode() const;
/**
* Returns the description used to create this iterator
* @return the description used to create this iterator
* @stable ICU 2.0
*/
virtual const UnicodeString& getRules(void) const;
virtual const UnicodeString& getRules() const;
//=======================================================================
// BreakIterator overrides
@@ -425,8 +425,7 @@ public:
* @return An iterator over the text being analyzed.
* @stable ICU 2.0
*/
virtual CharacterIterator& getText(void) const override;
virtual CharacterIterator& getText() const override;
/**
* Get a UText for the text being analyzed.
@@ -486,14 +485,14 @@ public:
* @return The offset of the beginning of the text, zero.
* @stable ICU 2.0
*/
virtual int32_t first(void) override;
virtual int32_t first() override;
/**
* Sets the current iteration position to the end of the text.
* @return The text's past-the-end offset.
* @stable ICU 2.0
*/
virtual int32_t last(void) override;
virtual int32_t last() override;
/**
* Advances the iterator either forward or backward the specified number of steps.
@@ -512,14 +511,14 @@ public:
* @return The position of the first boundary after this one.
* @stable ICU 2.0
*/
virtual int32_t next(void) override;
virtual int32_t next() override;
/**
* Moves the iterator backwards, to the last boundary preceding this one.
* @return The position of the last boundary position preceding this one.
* @stable ICU 2.0
*/
virtual int32_t previous(void) override;
virtual int32_t previous() override;
/**
* Sets the iterator to refer to the first boundary position following
@@ -557,8 +556,7 @@ public:
* @return The current iteration position.
* @stable ICU 2.0
*/
virtual int32_t current(void) const override;
virtual int32_t current() const override;
/**
* Return the status tag from the break rule that determined the boundary at
@@ -629,7 +627,7 @@ public:
* other classes have different class IDs.
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override;
virtual UClassID getDynamicClassID() const override;
/**
* Returns the class ID for this class. This is useful only for
@@ -642,7 +640,7 @@ public:
* @return The class ID for all objects of this class.
* @stable ICU 2.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();
#ifndef U_FORCE_HIDE_DEPRECATED_API
/**
@@ -799,7 +797,7 @@ private:
void dumpTables();
#endif /* U_HIDE_INTERNAL_API */
#ifndef U_HIDE_DRAFT_API
#ifndef U_HIDE_INTERNAL_API
/**
* Register a new external break engine. The external break engine will be adopted.
* Because ICU may choose to cache break engine internally, this must
@@ -811,7 +809,7 @@ private:
*/
static void U_EXPORT2 registerExternalBreakEngine(
ExternalBreakEngine* toAdopt, UErrorCode& status);
#endif /* U_HIDE_DRAFT_API */
#endif /* U_HIDE_INTERNAL_API */
};

View File

@@ -209,8 +209,7 @@ public:
* @return number of resources in a given resource.
* @stable ICU 2.0
*/
int32_t
getSize(void) const;
int32_t getSize() const;
/**
* returns a string from a string resource type
@@ -289,16 +288,14 @@ public:
* @return true if there are more elements, false if there is no more elements
* @stable ICU 2.0
*/
UBool
hasNext(void) const;
UBool hasNext() const;
/**
* Resets the internal context of a resource so that iteration starts from the first element.
*
* @stable ICU 2.0
*/
void
resetIterator(void);
void resetIterator();
/**
* Returns the key associated with this resource. Not all the resources have a key - only
@@ -307,8 +304,7 @@ public:
* @return a key associated to this resource, or nullptr if it doesn't have a key
* @stable ICU 2.0
*/
const char*
getKey(void) const;
const char* getKey() const;
/**
* Gets the locale ID of the resource bundle as a string.
@@ -317,9 +313,7 @@ public:
* @return the locale ID of the resource bundle as a string
* @stable ICU 2.0
*/
const char*
getName(void) const;
const char* getName() const;
/**
* Returns the type of a resource. Available types are defined in enum UResType
@@ -327,8 +321,7 @@ public:
* @return type of the given resource.
* @stable ICU 2.0
*/
UResType
getType(void) const;
UResType getType() const;
/**
* Returns the next resource in a given resource or nullptr if there are no more resources
@@ -424,8 +417,7 @@ public:
* @see getVersion
* @deprecated ICU 2.8 Use getVersion instead.
*/
const char*
getVersionNumber(void) const;
const char* getVersionNumber() const;
#endif /* U_HIDE_DEPRECATED_API */
/**
@@ -445,8 +437,7 @@ public:
* @return a Locale object
* @deprecated ICU 2.8 Use getLocale(ULocDataLocaleType type, UErrorCode &status) overload instead.
*/
const Locale&
getLocale(void) const;
const Locale& getLocale() const;
#endif /* U_HIDE_DEPRECATED_API */
/**

View File

@@ -156,14 +156,14 @@ public:
* @return a class ID for this object.
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override;
virtual UClassID getDynamicClassID() const override;
/**
* Return a class ID for this class (not really public)
* @return a class ID for this class
* @stable ICU 2.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();
protected:
/**

View File

@@ -25,11 +25,9 @@
U_NAMESPACE_BEGIN
// Forward declaration:
namespace number {
namespace impl {
namespace number::impl {
class SimpleModifier;
}
}
/**
* Formats simple patterns like "{1} was born in {0}".

View File

@@ -130,13 +130,13 @@ class U_COMMON_API StringPiece : public UMemory {
* @stable ICU 65
*/
template <typename T,
typename = typename std::enable_if<
(std::is_same<decltype(T().data()), const char*>::value
typename = std::enable_if_t<
(std::is_same_v<decltype(T().data()), const char*>
#if defined(__cpp_char8_t)
|| std::is_same<decltype(T().data()), const char8_t*>::value
|| std::is_same_v<decltype(T().data()), const char8_t*>
#endif
) &&
std::is_same<decltype(T().size()), size_t>::value>::type>
std::is_same_v<decltype(T().size()), size_t>>>
StringPiece(T str)
: ptr_(reinterpret_cast<const char*>(str.data())),
length_(static_cast<int32_t>(str.size())) {}

View File

@@ -25,6 +25,7 @@
#ifndef UCHAR_H
#define UCHAR_H
#include <stdbool.h>
#include "unicode/utypes.h"
#include "unicode/stringoptions.h"
#include "unicode/ucpmap.h"
@@ -668,12 +669,21 @@ typedef enum UProperty {
* @stable ICU 63
*/
UCHAR_VERTICAL_ORIENTATION=0x1018,
#ifndef U_HIDE_DRAFT_API
/**
* Enumerated property Identifier_Status.
* Used for UTS #39 General Security Profile for Identifiers
* (https://www.unicode.org/reports/tr39/#General_Security_Profile).
* @draft ICU 75
*/
UCHAR_IDENTIFIER_STATUS=0x1019,
#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the last constant for enumerated/integer Unicode properties.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UCHAR_INT_LIMIT=0x1019,
UCHAR_INT_LIMIT=0x101A,
#endif // U_HIDE_DEPRECATED_API
/** Bitmask property General_Category_Mask.
@@ -774,12 +784,28 @@ typedef enum UProperty {
UCHAR_SCRIPT_EXTENSIONS=0x7000,
/** First constant for Unicode properties with unusual value types. @stable ICU 4.6 */
UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS,
#ifndef U_HIDE_DRAFT_API
/**
* Miscellaneous property Identifier_Type.
* Used for UTS #39 General Security Profile for Identifiers
* (https://www.unicode.org/reports/tr39/#General_Security_Profile).
*
* Corresponds to u_hasIDType() and u_getIDTypes().
*
* Each code point maps to a <i>set</i> of UIdentifierType values.
*
* @see u_hasIDType
* @see u_getIDTypes
* @draft ICU 75
*/
UCHAR_IDENTIFIER_TYPE=0x7001,
#endif // U_HIDE_DRAFT_API
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the last constant for Unicode properties with unusual value types.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
UCHAR_OTHER_PROPERTY_LIMIT=0x7001,
UCHAR_OTHER_PROPERTY_LIMIT=0x7002,
#endif // U_HIDE_DEPRECATED_API
/** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */
@@ -2701,6 +2727,68 @@ typedef enum UVerticalOrientation {
U_VO_UPRIGHT,
} UVerticalOrientation;
#ifndef U_HIDE_DRAFT_API
/**
* Identifier Status constants.
* See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type.
*
* @see UCHAR_IDENTIFIER_STATUS
* @draft ICU 75
*/
typedef enum UIdentifierStatus {
/*
* Note: UIdentifierStatus constants are parsed by preparseucd.py.
* It matches lines like
* U_ID_STATUS_<Unicode Identifier_Status value name>
*/
/** @draft ICU 75 */
U_ID_STATUS_RESTRICTED,
/** @draft ICU 75 */
U_ID_STATUS_ALLOWED,
} UIdentifierStatus;
/**
* Identifier Type constants.
* See https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type.
*
* @see UCHAR_IDENTIFIER_TYPE
* @draft ICU 75
*/
typedef enum UIdentifierType {
/*
* Note: UIdentifierType constants are parsed by preparseucd.py.
* It matches lines like
* U_ID_TYPE_<Unicode Identifier_Type value name>
*/
/** @draft ICU 75 */
U_ID_TYPE_NOT_CHARACTER,
/** @draft ICU 75 */
U_ID_TYPE_DEPRECATED,
/** @draft ICU 75 */
U_ID_TYPE_DEFAULT_IGNORABLE,
/** @draft ICU 75 */
U_ID_TYPE_NOT_NFKC,
/** @draft ICU 75 */
U_ID_TYPE_NOT_XID,
/** @draft ICU 75 */
U_ID_TYPE_EXCLUSION,
/** @draft ICU 75 */
U_ID_TYPE_OBSOLETE,
/** @draft ICU 75 */
U_ID_TYPE_TECHNICAL,
/** @draft ICU 75 */
U_ID_TYPE_UNCOMMON_USE,
/** @draft ICU 75 */
U_ID_TYPE_LIMITED_USE,
/** @draft ICU 75 */
U_ID_TYPE_INCLUSION,
/** @draft ICU 75 */
U_ID_TYPE_RECOMMENDED,
} UIdentifierType;
#endif // U_HIDE_DRAFT_API
/**
* Check a binary Unicode property for a code point.
*
@@ -3905,6 +3993,59 @@ u_isIDStart(UChar32 c);
U_CAPI UBool U_EXPORT2
u_isIDPart(UChar32 c);
#ifndef U_HIDE_DRAFT_API
/**
* Does the set of Identifier_Type values code point c contain the given type?
*
* Used for UTS #39 General Security Profile for Identifiers
* (https://www.unicode.org/reports/tr39/#General_Security_Profile).
*
* Each code point maps to a <i>set</i> of UIdentifierType values.
*
* @param c code point
* @param type Identifier_Type to check
* @return true if type is in Identifier_Type(c)
* @draft ICU 75
*/
U_CAPI bool U_EXPORT2
u_hasIDType(UChar32 c, UIdentifierType type);
/**
* Writes code point c's Identifier_Type as a list of UIdentifierType values
* to the output types array and returns the number of types.
*
* Used for UTS #39 General Security Profile for Identifiers
* (https://www.unicode.org/reports/tr39/#General_Security_Profile).
*
* Each code point maps to a <i>set</i> of UIdentifierType values.
* There is always at least one type.
* The order of output values is undefined.
* Each type is output at most once;
* there cannot be more output values than UIdentifierType constants.
* In addition, only some of the types can be combined with others,
* and usually only a small number of types occur together.
* Future versions might add additional types.
* See UTS #39 and its data files for details.
*
* If there are more than capacity types to be written, then
* U_BUFFER_OVERFLOW_ERROR is set and the number of types is returned.
* (Usual ICU buffer handling behavior.)
*
* @param c code point
* @param types output array
* @param capacity capacity of the array
* @param pErrorCode Standard ICU error code. Its input value must
* pass the U_SUCCESS() test, or else the function returns
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return number of values in c's Identifier_Type,
* written to types unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
* @draft ICU 75
*/
U_CAPI int32_t U_EXPORT2
u_getIDTypes(UChar32 c, UIdentifierType *types, int32_t capacity, UErrorCode *pErrorCode);
#endif // U_HIDE_DRAFT_API
/**
* Determines if the specified character should be regarded
* as an ignorable character in an identifier,

View File

@@ -126,7 +126,7 @@ public:
* @return the hash code.
* @stable ICU 2.0
*/
virtual int32_t hashCode(void) const override;
virtual int32_t hashCode() const override;
/**
* Returns a new UCharCharacterIterator referring to the same
@@ -144,7 +144,7 @@ public:
* @return the first code unit in its iteration range.
* @stable ICU 2.0
*/
virtual char16_t first(void) override;
virtual char16_t first() override;
/**
* Sets the iterator to refer to the first code unit in its
@@ -154,7 +154,7 @@ public:
* @return the first code unit in its iteration range
* @stable ICU 2.0
*/
virtual char16_t firstPostInc(void) override;
virtual char16_t firstPostInc() override;
/**
* Sets the iterator to refer to the first code point in its
@@ -165,7 +165,7 @@ public:
* @return the first code point in its iteration range
* @stable ICU 2.0
*/
virtual UChar32 first32(void) override;
virtual UChar32 first32() override;
/**
* Sets the iterator to refer to the first code point in its
@@ -175,7 +175,7 @@ public:
* @return the first code point in its iteration range.
* @stable ICU 2.0
*/
virtual UChar32 first32PostInc(void) override;
virtual UChar32 first32PostInc() override;
/**
* Sets the iterator to refer to the last code unit in its
@@ -184,7 +184,7 @@ public:
* @return the last code unit in its iteration range.
* @stable ICU 2.0
*/
virtual char16_t last(void) override;
virtual char16_t last() override;
/**
* Sets the iterator to refer to the last code point in its
@@ -193,7 +193,7 @@ public:
* @return the last code point in its iteration range.
* @stable ICU 2.0
*/
virtual UChar32 last32(void) override;
virtual UChar32 last32() override;
/**
* Sets the iterator to refer to the "position"-th code unit
@@ -223,14 +223,14 @@ public:
* @return the code unit the iterator currently refers to.
* @stable ICU 2.0
*/
virtual char16_t current(void) const override;
virtual char16_t current() const override;
/**
* Returns the code point the iterator currently refers to.
* @return the code point the iterator currently refers to.
* @stable ICU 2.0
*/
virtual UChar32 current32(void) const override;
virtual UChar32 current32() const override;
/**
* Advances to the next code unit in the iteration range (toward
@@ -239,7 +239,7 @@ public:
* @return the next code unit in the iteration range.
* @stable ICU 2.0
*/
virtual char16_t next(void) override;
virtual char16_t next() override;
/**
* Gets the current code unit for returning and advances to the next code unit
@@ -249,7 +249,7 @@ public:
* @return the current code unit.
* @stable ICU 2.0
*/
virtual char16_t nextPostInc(void) override;
virtual char16_t nextPostInc() override;
/**
* Advances to the next code point in the iteration range (toward
@@ -261,7 +261,7 @@ public:
* @return the next code point in the iteration range.
* @stable ICU 2.0
*/
virtual UChar32 next32(void) override;
virtual UChar32 next32() override;
/**
* Gets the current code point for returning and advances to the next code point
@@ -271,7 +271,7 @@ public:
* @return the current point.
* @stable ICU 2.0
*/
virtual UChar32 next32PostInc(void) override;
virtual UChar32 next32PostInc() override;
/**
* Returns false if there are no more code units or code points
@@ -291,7 +291,7 @@ public:
* @return the previous code unit in the iteration range.
* @stable ICU 2.0
*/
virtual char16_t previous(void) override;
virtual char16_t previous() override;
/**
* Advances to the previous code point in the iteration range (toward
@@ -300,7 +300,7 @@ public:
* @return the previous code point in the iteration range.
* @stable ICU 2.0
*/
virtual UChar32 previous32(void) override;
virtual UChar32 previous32() override;
/**
* Returns false if there are no more code units or code points
@@ -363,14 +363,14 @@ public:
* @return a class ID for this class
* @stable ICU 2.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();
/**
* Return a class ID for this object (not really public)
* @return a class ID for this object.
* @stable ICU 2.0
*/
virtual UClassID getDynamicClassID(void) const override;
virtual UClassID getDynamicClassID() const override;
protected:
/**

View File

@@ -344,8 +344,6 @@ ucnv_compareNames(const char *name1, const char *name2);
* other than its an alias starting with the letters "cp". Please do not
* associate any meaning to these aliases.</p>
*
* \snippet samples/ucnv/convsamp.cpp ucnv_open
*
* @param converterName Name of the coded character set table.
* This may have options appended to the string.
* IANA alias character set names, IBM CCSIDs starting with "ibm-",
@@ -1986,7 +1984,6 @@ ucnv_usesFallback(const UConverter *cnv);
* instead of the input signature bytes.
* <p>
* Usage:
* \snippet samples/ucnv/convsamp.cpp ucnv_detectUnicodeSignature
*
* @param source The source string in which the signature should be detected.
* @param sourceLength Length of the input string, or -1 if terminated with a NUL byte.

View File

@@ -413,6 +413,17 @@
# define UCONFIG_NO_FORMATTING 0
#endif
/**
* \def UCONFIG_NO_MF2
* This switch turns off the experimental MessageFormat 2.0 API.
*
* @internal ICU 75 technology preview
* @deprecated This API is for technology preview only.
*/
#ifndef UCONFIG_NO_MF2
# define UCONFIG_NO_MF2 0
#endif
/**
* \def UCONFIG_NO_TRANSLITERATION
* This switch turns off transliteration.

View File

@@ -399,6 +399,9 @@ uloc_setDefault(const char* localeID,
/**
* Gets the language code for the specified locale.
*
* This function may return with a failure error code for certain kinds of inputs
* but does not fully check for well-formed locale IDs / language tags.
*
* @param localeID the locale to get the ISO language code with
* @param language the language code for localeID
* @param languageCapacity the size of the language buffer to store the
@@ -417,6 +420,9 @@ uloc_getLanguage(const char* localeID,
/**
* Gets the script code for the specified locale.
*
* This function may return with a failure error code for certain kinds of inputs
* but does not fully check for well-formed locale IDs / language tags.
*
* @param localeID the locale to get the ISO language code with
* @param script the language code for localeID
* @param scriptCapacity the size of the language buffer to store the
@@ -435,6 +441,9 @@ uloc_getScript(const char* localeID,
/**
* Gets the country code for the specified locale.
*
* This function may return with a failure error code for certain kinds of inputs
* but does not fully check for well-formed locale IDs / language tags.
*
* @param localeID the locale to get the country code with
* @param country the country code for localeID
* @param countryCapacity the size of the country buffer to store the
@@ -453,6 +462,9 @@ uloc_getCountry(const char* localeID,
/**
* Gets the variant code for the specified locale.
*
* This function may return with a failure error code for certain kinds of inputs
* but does not fully check for well-formed locale IDs / language tags.
*
* @param localeID the locale to get the variant code with
* @param variant the variant code for localeID
* @param variantCapacity the size of the variant buffer to store the
@@ -471,6 +483,10 @@ uloc_getVariant(const char* localeID,
/**
* Gets the full name for the specified locale.
*
* This function may return with a failure error code for certain kinds of inputs
* but does not fully check for well-formed locale IDs / language tags.
*
* Note: This has the effect of 'canonicalizing' the ICU locale ID to
* a certain extent. Upper and lower case are set as needed.
* It does NOT map aliased names in any way.
@@ -1158,19 +1174,20 @@ uloc_getLocaleForLCID(uint32_t hostID, char *locale, int32_t localeCapacity,
*
* If localeID is already in the maximal form, or there is no data available
* for maximization, it will be copied to the output buffer. For example,
* "und-Zzzz" cannot be maximized, since there is no reasonable maximization.
* "sh" cannot be maximized, since there is no reasonable maximization.
*
* Examples:
*
* "und_Zzzz" maximizes to "en_Latn_US"
*
* "en" maximizes to "en_Latn_US"
*
* "de" maximizes to "de_Latn_US"
* "de" maximizes to "de_Latn_DE"
*
* "sr" maximizes to "sr_Cyrl_RS"
*
* "sh" maximizes to "sr_Latn_RS" (Note this will not reverse.)
* "zh_Hani" maximizes to "zh_Hani_CN"
*
* "zh_Hani" maximizes to "zh_Hans_CN" (Note this will not reverse.)
*
* @param localeID The locale to maximize
* @param maximizedLocaleID The maximized locale

View File

@@ -74,7 +74,7 @@ typedef struct ULocaleBuilder ULocaleBuilder;
* @draft ICU 74
*/
U_CAPI ULocaleBuilder* U_EXPORT2
ulocbld_open();
ulocbld_open(void);
/**
* Close the builder and destroy it's internal states.

View File

@@ -370,22 +370,14 @@ typedef int8_t UBool;
#if 1
// #if 1 is normal. UChar defaults to char16_t in C++.
// For configuration testing of UChar=uint16_t temporarily change this to #if 0.
// The intltest Makefile #defines UCHAR_TYPE=char16_t,
// so we only #define it to uint16_t if it is undefined so far.
#elif !defined(UCHAR_TYPE)
#else
# define UCHAR_TYPE uint16_t
#endif
#if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
// Inside the ICU library code, never configurable.
#if defined(U_ALL_IMPLEMENTATION) || !defined(UCHAR_TYPE)
typedef char16_t UChar;
#elif defined(UCHAR_TYPE)
typedef UCHAR_TYPE UChar;
#elif U_CPLUSPLUS_VERSION != 0
typedef char16_t UChar; // C++
#else
typedef uint16_t UChar; // C
typedef UCHAR_TYPE UChar;
#endif
/**

View File

@@ -83,7 +83,7 @@ public:
* @return The class ID for all objects of this class.
* @stable ICU 2.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();
/**
* Returns a unique class ID <b>polymorphically</b>. This method
@@ -100,7 +100,7 @@ public:
* different class IDs.
* @stable ICU 2.4
*/
virtual UClassID getDynamicClassID(void) const override = 0;
virtual UClassID getDynamicClassID() const override = 0;
/**
* Set the data object associated with this functor. The data

View File

@@ -333,7 +333,7 @@ public:
* @see setToBogus()
* @stable ICU 4.0
*/
inline UBool isBogus(void) const;
inline UBool isBogus() const;
/**
* Make this UnicodeSet object invalid.
@@ -522,7 +522,7 @@ public:
* @see Object#hashCode()
* @stable ICU 2.0
*/
virtual int32_t hashCode(void) const;
virtual int32_t hashCode() const;
/**
* Get a UnicodeSet pointer from a USet
@@ -792,7 +792,7 @@ public:
* @stable ICU 2.0
* @see getRangeCount
*/
virtual int32_t size(void) const;
virtual int32_t size() const;
/**
* Returns <tt>true</tt> if this set contains no elements.
@@ -800,7 +800,7 @@ public:
* @return <tt>true</tt> if this set contains no elements.
* @stable ICU 2.0
*/
virtual UBool isEmpty(void) const;
virtual UBool isEmpty() const;
/**
* @return true if this set contains multi-character strings or the empty string.
@@ -1394,7 +1394,7 @@ public:
* A frozen set will not be modified.
* @stable ICU 2.0
*/
virtual UnicodeSet& clear(void);
virtual UnicodeSet& clear();
/**
* Close this set over the given attribute. For the attribute
@@ -1440,7 +1440,7 @@ public:
* @see #getRangeEnd
* @stable ICU 2.4
*/
virtual int32_t getRangeCount(void) const;
virtual int32_t getRangeCount() const;
/**
* Iteration method that returns the first character in the
@@ -1529,7 +1529,7 @@ public:
* @return The class ID for all objects of this class.
* @stable ICU 2.0
*/
static UClassID U_EXPORT2 getStaticClassID(void);
static UClassID U_EXPORT2 getStaticClassID();
/**
* Implement UnicodeFunctor API.
@@ -1539,9 +1539,9 @@ public:
* different class IDs.
* @stable ICU 2.4
*/
virtual UClassID getDynamicClassID(void) const override;
virtual UClassID getDynamicClassID() const override;
private:
private:
// Private API for the USet API
@@ -1602,7 +1602,7 @@ private:
bool ensureBufferCapacity(int32_t newLen);
void swapBuffers(void);
void swapBuffers();
UBool allocateStrings(UErrorCode &status);
int32_t stringsSize() const;

View File

@@ -1611,9 +1611,9 @@ public:
* @stable ICU 2.0
*/
inline int32_t extract(int32_t start,
int32_t startLength,
char *target,
const char *codepage = 0) const;
int32_t startLength,
char* target,
const char* codepage = nullptr) const;
/**
* Copy the characters in the range
@@ -1759,7 +1759,7 @@ public:
* @see countChar32
* @stable ICU 2.0
*/
inline int32_t length(void) const;
inline int32_t length() const;
/**
* Count Unicode code points in the length char16_t code units of the string.
@@ -1808,7 +1808,7 @@ public:
* @return true if this string contains 0 characters, false otherwise.
* @stable ICU 2.0
*/
inline UBool isEmpty(void) const;
inline UBool isEmpty() const;
/**
* Return the capacity of the internal buffer of the UnicodeString object.
@@ -1819,7 +1819,7 @@ public:
* @see getBuffer
* @stable ICU 2.0
*/
inline int32_t getCapacity(void) const;
inline int32_t getCapacity() const;
/* Other operations */
@@ -1828,7 +1828,7 @@ public:
* @return The hash code of this UnicodeString.
* @stable ICU 2.0
*/
inline int32_t hashCode(void) const;
inline int32_t hashCode() const;
/**
* Determine if this object contains a valid string.
@@ -1842,8 +1842,7 @@ public:
* @see setToBogus()
* @stable ICU 2.0
*/
inline UBool isBogus(void) const;
inline UBool isBogus() const;
//========================================
// Write operations
@@ -2624,8 +2623,7 @@ public:
* @return a reference to this
* @stable ICU 2.0
*/
UnicodeString& trim(void);
UnicodeString& trim();
/* Miscellaneous operations */
@@ -2634,7 +2632,7 @@ public:
* @return a reference to this
* @stable ICU 2.0
*/
inline UnicodeString& reverse(void);
inline UnicodeString& reverse();
/**
* Reverse the range [`start`, `start + length`) in
@@ -2653,7 +2651,7 @@ public:
* @return A reference to this.
* @stable ICU 2.0
*/
UnicodeString& toUpper(void);
UnicodeString& toUpper();
/**
* Convert the characters in this to UPPER CASE following the conventions of
@@ -2670,7 +2668,7 @@ public:
* @return A reference to this.
* @stable ICU 2.0
*/
UnicodeString& toLower(void);
UnicodeString& toLower();
/**
* Convert the characters in this to lower case following the conventions of
@@ -3590,12 +3588,12 @@ private:
int32_t length);
// calculate hash code
int32_t doHashCode(void) const;
int32_t doHashCode() const;
// get pointer to start of array
// these do not check for kOpenGetBuffer, unlike the public getBuffer() function
inline char16_t* getArrayStart(void);
inline const char16_t* getArrayStart(void) const;
inline char16_t* getArrayStart();
inline const char16_t* getArrayStart() const;
inline UBool hasShortLength() const;
inline int32_t getShortLength() const;
@@ -3622,7 +3620,7 @@ private:
UBool allocate(int32_t capacity);
// release the array if owned
void releaseArray(void);
void releaseArray();
// turn a bogus string into an empty one
void unBogus();
@@ -3684,10 +3682,10 @@ private:
* Return false if memory could not be allocated.
*/
UBool cloneArrayIfNeeded(int32_t newCapacity = -1,
int32_t growCapacity = -1,
UBool doCopyArray = true,
int32_t **pBufferToDelete = 0,
UBool forceClone = false);
int32_t growCapacity = -1,
UBool doCopyArray = true,
int32_t** pBufferToDelete = nullptr,
UBool forceClone = false);
/**
* Common function for UnicodeString case mappings.
@@ -3702,9 +3700,9 @@ private:
UStringCaseMapper *stringCaseMapper);
// ref counting
void addRef(void);
int32_t removeRef(void);
int32_t refCount(void) const;
void addRef();
int32_t removeRef();
int32_t refCount() const;
// constants
enum {
@@ -4510,7 +4508,7 @@ UnicodeString::extract(int32_t start,
{
// This dstSize value will be checked explicitly
return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage);
return extract(start, _length, dst, dst != nullptr ? 0xffffffff : 0, codepage);
}
#endif

View File

@@ -272,6 +272,7 @@
#define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion)
#define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverter)
#define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure)
#define u_getIDTypes U_ICU_ENTRY_POINT_RENAME(u_getIDTypes)
#define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment)
#define u_getIntPropertyMap U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMap)
#define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMaxValue)
@@ -289,6 +290,7 @@
#define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion)
#define u_get_stdout U_ICU_ENTRY_POINT_RENAME(u_get_stdout)
#define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty)
#define u_hasIDType U_ICU_ENTRY_POINT_RENAME(u_hasIDType)
#define u_init U_ICU_ENTRY_POINT_RENAME(u_init)
#define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable)
#define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart)
@@ -1192,16 +1194,20 @@
#define ulocimp_canonicalize U_ICU_ENTRY_POINT_RENAME(ulocimp_canonicalize)
#define ulocimp_forLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_forLanguageTag)
#define ulocimp_getBaseName U_ICU_ENTRY_POINT_RENAME(ulocimp_getBaseName)
#define ulocimp_getCountry U_ICU_ENTRY_POINT_RENAME(ulocimp_getCountry)
#define ulocimp_getKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocimp_getKeywordValue)
#define ulocimp_getKeywords U_ICU_ENTRY_POINT_RENAME(ulocimp_getKeywords)
#define ulocimp_getKnownCanonicalizedLocaleForTest U_ICU_ENTRY_POINT_RENAME(ulocimp_getKnownCanonicalizedLocaleForTest)
#define ulocimp_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocimp_getLanguage)
#define ulocimp_getName U_ICU_ENTRY_POINT_RENAME(ulocimp_getName)
#define ulocimp_getParent U_ICU_ENTRY_POINT_RENAME(ulocimp_getParent)
#define ulocimp_getRegion U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegion)
#define ulocimp_getRegionForSupplementalData U_ICU_ENTRY_POINT_RENAME(ulocimp_getRegionForSupplementalData)
#define ulocimp_getScript U_ICU_ENTRY_POINT_RENAME(ulocimp_getScript)
#define ulocimp_getSubtags U_ICU_ENTRY_POINT_RENAME(ulocimp_getSubtags)
#define ulocimp_getVariant U_ICU_ENTRY_POINT_RENAME(ulocimp_getVariant)
#define ulocimp_isCanonicalizedLocaleForTest U_ICU_ENTRY_POINT_RENAME(ulocimp_isCanonicalizedLocaleForTest)
#define ulocimp_minimizeSubtags U_ICU_ENTRY_POINT_RENAME(ulocimp_minimizeSubtags)
#define ulocimp_setKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocimp_setKeywordValue)
#define ulocimp_toBcpKey U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpKey)
#define ulocimp_toBcpType U_ICU_ENTRY_POINT_RENAME(ulocimp_toBcpType)
#define ulocimp_toLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocimp_toLanguageTag)
@@ -1800,6 +1806,7 @@
#define usnum_multiplyByPowerOfTen U_ICU_ENTRY_POINT_RENAME(usnum_multiplyByPowerOfTen)
#define usnum_openForInt64 U_ICU_ENTRY_POINT_RENAME(usnum_openForInt64)
#define usnum_roundTo U_ICU_ENTRY_POINT_RENAME(usnum_roundTo)
#define usnum_setMaximumIntegerDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMaximumIntegerDigits)
#define usnum_setMinimumFractionDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumFractionDigits)
#define usnum_setMinimumIntegerDigits U_ICU_ENTRY_POINT_RENAME(usnum_setMinimumIntegerDigits)
#define usnum_setSign U_ICU_ENTRY_POINT_RENAME(usnum_setSign)

View File

@@ -500,6 +500,9 @@ typedef enum UScriptCode {
/** @stable ICU 72 */
USCRIPT_NAG_MUNDARI = 199,/* Nagm */
/** @stable ICU 75 */
USCRIPT_ARABIC_NASTALIQ = 200, /* Aran */
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UScriptCode value.
@@ -507,7 +510,7 @@ typedef enum UScriptCode {
*
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
USCRIPT_CODE_LIMIT = 200
USCRIPT_CODE_LIMIT = 201
#endif // U_HIDE_DEPRECATED_API
} UScriptCode;

View File

@@ -109,7 +109,6 @@ enum {
*/
USET_ADD_CASE_MAPPINGS = 4,
#ifndef U_HIDE_DRAFT_API
/**
* Enable case insensitive matching.
* Same as USET_CASE_INSENSITIVE but using only Simple_Case_Folding (scf) mappings,
@@ -120,10 +119,9 @@ enum {
* regular expression implementations where only Simple_Case_Folding mappings are used,
* such as in ECMAScript (JavaScript) regular expressions.
*
* @draft ICU 73
* @stable ICU 73
*/
USET_SIMPLE_CASE_INSENSITIVE = 6
#endif // U_HIDE_DRAFT_API
};
/**

View File

@@ -438,6 +438,7 @@ typedef enum UErrorCode {
U_PLUGIN_CHANGED_LEVEL_WARNING = -120, /**< A plugin caused a level change. May not be an error, but later plugins may not load. */
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal UErrorCode warning value.
@@ -568,12 +569,27 @@ typedef enum UErrorCode {
U_FORMAT_INEXACT_ERROR, /**< Cannot format a number exactly and rounding mode is ROUND_UNNECESSARY @stable ICU 4.8 */
U_NUMBER_ARG_OUTOFBOUNDS_ERROR, /**< The argument to a NumberFormatter helper method was out of bounds; the bounds are usually 0 to 999. @stable ICU 61 */
U_NUMBER_SKELETON_SYNTAX_ERROR, /**< The number skeleton passed to C++ NumberFormatter or C UNumberFormatter was invalid or contained a syntax error. @stable ICU 62 */
/* MessageFormat 2.0 errors */
U_MF_UNRESOLVED_VARIABLE_ERROR, /**< A variable is referred to but not bound by any definition @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_SYNTAX_ERROR, /**< Includes all syntax errors @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_UNKNOWN_FUNCTION_ERROR, /**< An annotation refers to a function not defined by the standard or custom function registry @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_VARIANT_KEY_MISMATCH_ERROR, /**< In a match-construct, one or more variants had a different number of keys from the number of selectors @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_FORMATTING_ERROR, /**< Covers all runtime errors: for example, an internally inconsistent set of options. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_NONEXHAUSTIVE_PATTERN_ERROR, /**< In a match-construct, the variants do not cover all possible values @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_DUPLICATE_OPTION_NAME_ERROR, /**< In an annotation, the same option name appears more than once @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_SELECTOR_ERROR, /**< A selector function is applied to an operand of the wrong type @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_MISSING_SELECTOR_ANNOTATION_ERROR, /**< A selector expression evaluates to an unannotated operand. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_DUPLICATE_DECLARATION_ERROR, /**< The same variable is declared in more than one .local or .input declaration. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_OPERAND_MISMATCH_ERROR, /**< An operand provided to a function does not have the required form for that function @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_UNSUPPORTED_STATEMENT_ERROR, /**< A message includes a reserved statement. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
U_MF_UNSUPPORTED_EXPRESSION_ERROR, /**< A message includes syntax reserved for future standardization or private implementation use. @internal ICU 75 technology preview @deprecated This API is for technology preview only. */
#ifndef U_HIDE_DEPRECATED_API
/**
* One more than the highest normal formatting API error code.
* @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
*/
U_FMT_PARSE_ERROR_LIMIT = 0x10114,
U_FMT_PARSE_ERROR_LIMIT = 0x10121,
#endif // U_HIDE_DEPRECATED_API
/*

View File

@@ -53,13 +53,13 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
#define U_ICU_VERSION_MAJOR_NUM 74
#define U_ICU_VERSION_MAJOR_NUM 75
/** The current ICU minor version as an integer.
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
#define U_ICU_VERSION_MINOR_NUM 2
#define U_ICU_VERSION_MINOR_NUM 1
/** The current ICU patchlevel version as an integer.
* This value will change in the subsequent releases of ICU
@@ -79,7 +79,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
#define U_ICU_VERSION_SUFFIX _74
#define U_ICU_VERSION_SUFFIX _75
/**
* \def U_DEF2_ICU_ENTRY_POINT_RENAME
@@ -132,7 +132,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.4
*/
#define U_ICU_VERSION "74.2"
#define U_ICU_VERSION "75.1"
/**
* The current ICU library major version number as a string, for library name suffixes.
@@ -145,13 +145,13 @@
*
* @stable ICU 2.6
*/
#define U_ICU_VERSION_SHORT "74"
#define U_ICU_VERSION_SHORT "75"
#ifndef U_HIDE_INTERNAL_API
/** Data version in ICU4C.
* @internal ICU 4.4 Internal Use Only
**/
#define U_ICU_DATA_VERSION "74.2"
#define U_ICU_DATA_VERSION "75.1"
#endif /* U_HIDE_INTERNAL_API */
/*===========================================================================