diff options
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/i18n/ucol.cpp')
-rw-r--r-- | Build/source/libs/icu/icu-src/source/i18n/ucol.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/libs/icu/icu-src/source/i18n/ucol.cpp b/Build/source/libs/icu/icu-src/source/i18n/ucol.cpp index f59333ede3c..8e1df8d5577 100644 --- a/Build/source/libs/icu/icu-src/source/i18n/ucol.cpp +++ b/Build/source/libs/icu/icu-src/source/i18n/ucol.cpp @@ -96,12 +96,18 @@ ucol_safeClone(const UCollator *coll, void * /*stackBuffer*/, int32_t * pBufferS if (newColl == NULL) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; - } else { + } else if (pBufferSize != NULL) { *status = U_SAFECLONE_ALLOCATED_WARNING; } return newColl->toUCollator(); } +U_CAPI UCollator* U_EXPORT2 +ucol_clone(const UCollator *coll, UErrorCode *status) +{ + return ucol_safeClone(coll, nullptr, nullptr, status); +} + U_CAPI void U_EXPORT2 ucol_close(UCollator *coll) { |