2020-08-11 11:10:23 +02:00
|
|
|
// © 2016 and later: Unicode, Inc. and others.
|
|
|
|
// License & terms of use: http://www.unicode.org/copyright.html
|
|
|
|
/*
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009-2011, International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "unicode/icudataver.h"
|
|
|
|
#include "unicode/ures.h"
|
|
|
|
#include "uresimp.h" /* for ures_getVersionByKey */
|
|
|
|
|
|
|
|
U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status) {
|
2023-05-23 02:05:01 +02:00
|
|
|
UResourceBundle *icudatares = nullptr;
|
2020-08-11 11:10:23 +02:00
|
|
|
|
|
|
|
if (U_FAILURE(*status)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-05-23 02:05:01 +02:00
|
|
|
if (dataVersionFillin != nullptr) {
|
|
|
|
icudatares = ures_openDirect(nullptr, U_ICU_VERSION_BUNDLE , status);
|
2020-08-11 11:10:23 +02:00
|
|
|
if (U_SUCCESS(*status)) {
|
|
|
|
ures_getVersionByKey(icudatares, U_ICU_DATA_KEY, dataVersionFillin, status);
|
|
|
|
}
|
|
|
|
ures_close(icudatares);
|
|
|
|
}
|
|
|
|
}
|