1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Update HarfBuzz, ICU and FreeType

HarfBuzz: Update to version 7.3.0
ICU4C: Update to version 73.1
FreeType: Update to version 2.13.0
This commit is contained in:
bruvzg
2023-05-23 03:05:01 +03:00
parent d5c1b9f883
commit b64df2bf74
810 changed files with 32198 additions and 11081 deletions

View File

@@ -33,21 +33,21 @@ static const int32_t PAD = 8;
or reallocating it if at least 'capacity' bytes are not available. */
static void* _getBuffer(UEnumeration* en, int32_t capacity) {
if (en->baseContext != NULL) {
if (en->baseContext != nullptr) {
if (((_UEnumBuffer*) en->baseContext)->len < capacity) {
capacity += PAD;
en->baseContext = uprv_realloc(en->baseContext,
sizeof(int32_t) + capacity);
if (en->baseContext == NULL) {
return NULL;
if (en->baseContext == nullptr) {
return nullptr;
}
((_UEnumBuffer*) en->baseContext)->len = capacity;
}
} else {
capacity += PAD;
en->baseContext = uprv_malloc(sizeof(int32_t) + capacity);
if (en->baseContext == NULL) {
return NULL;
if (en->baseContext == nullptr) {
return nullptr;
}
((_UEnumBuffer*) en->baseContext)->len = capacity;
}
@@ -59,7 +59,7 @@ U_CAPI void U_EXPORT2
uenum_close(UEnumeration* en)
{
if (en) {
if (en->close != NULL) {
if (en->close != nullptr) {
if (en->baseContext) {
uprv_free(en->baseContext);
}
@@ -76,7 +76,7 @@ uenum_count(UEnumeration* en, UErrorCode* status)
if (!en || U_FAILURE(*status)) {
return -1;
}
if (en->count != NULL) {
if (en->count != nullptr) {
return en->count(en, status);
} else {
*status = U_UNSUPPORTED_ERROR;
@@ -85,18 +85,18 @@ uenum_count(UEnumeration* en, UErrorCode* status)
}
/* Don't call this directly. Only uenum_unext should be calling this. */
U_CAPI const UChar* U_EXPORT2
U_CAPI const char16_t* U_EXPORT2
uenum_unextDefault(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status)
{
UChar *ustr = NULL;
char16_t *ustr = nullptr;
int32_t len = 0;
if (en->next != NULL) {
if (en->next != nullptr) {
const char *cstr = en->next(en, &len, status);
if (cstr != NULL) {
ustr = (UChar*) _getBuffer(en, (len+1) * sizeof(UChar));
if (ustr == NULL) {
if (cstr != nullptr) {
ustr = (char16_t*) _getBuffer(en, (len+1) * sizeof(char16_t));
if (ustr == nullptr) {
*status = U_MEMORY_ALLOCATION_ERROR;
} else {
u_charsToUChars(cstr, ustr, len+1);
@@ -117,39 +117,39 @@ uenum_nextDefault(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status)
{
if (en->uNext != NULL) {
if (en->uNext != nullptr) {
char *tempCharVal;
const UChar *tempUCharVal = en->uNext(en, resultLength, status);
if (tempUCharVal == NULL) {
return NULL;
const char16_t *tempUCharVal = en->uNext(en, resultLength, status);
if (tempUCharVal == nullptr) {
return nullptr;
}
tempCharVal = (char*)
_getBuffer(en, (*resultLength+1) * sizeof(char));
if (!tempCharVal) {
*status = U_MEMORY_ALLOCATION_ERROR;
return NULL;
return nullptr;
}
u_UCharsToChars(tempUCharVal, tempCharVal, *resultLength + 1);
return tempCharVal;
} else {
*status = U_UNSUPPORTED_ERROR;
return NULL;
return nullptr;
}
}
U_CAPI const UChar* U_EXPORT2
U_CAPI const char16_t* U_EXPORT2
uenum_unext(UEnumeration* en,
int32_t* resultLength,
UErrorCode* status)
{
if (!en || U_FAILURE(*status)) {
return NULL;
return nullptr;
}
if (en->uNext != NULL) {
if (en->uNext != nullptr) {
return en->uNext(en, resultLength, status);
} else {
*status = U_UNSUPPORTED_ERROR;
return NULL;
return nullptr;
}
}
@@ -159,10 +159,10 @@ uenum_next(UEnumeration* en,
UErrorCode* status)
{
if (!en || U_FAILURE(*status)) {
return NULL;
return nullptr;
}
if (en->next != NULL) {
if (resultLength != NULL) {
if (en->next != nullptr) {
if (resultLength != nullptr) {
return en->next(en, resultLength, status);
}
else {
@@ -171,7 +171,7 @@ uenum_next(UEnumeration* en,
}
} else {
*status = U_UNSUPPORTED_ERROR;
return NULL;
return nullptr;
}
}
@@ -181,7 +181,7 @@ uenum_reset(UEnumeration* en, UErrorCode* status)
if (!en || U_FAILURE(*status)) {
return;
}
if (en->reset != NULL) {
if (en->reset != nullptr) {
en->reset(en, status);
} else {
*status = U_UNSUPPORTED_ERROR;