1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 ******************************************************************************
6 * Copyright (C) 2009-2011, International Business Machines
7 * Corporation and others. All Rights Reserved.
9 ******************************************************************************
12 #include "unicode/utypes.h"
13 #include "unicode/icudataver.h"
14 #include "unicode/ures.h"
15 #include "uresimp.h" /* for ures_getVersionByKey */
17 U_CAPI
void U_EXPORT2
u_getDataVersion(UVersionInfo dataVersionFillin
, UErrorCode
*status
) {
18 UResourceBundle
*icudatares
= NULL
;
20 if (U_FAILURE(*status
)) {
24 if (dataVersionFillin
!= NULL
) {
25 icudatares
= ures_openDirect(NULL
, U_ICU_VERSION_BUNDLE
, status
);
26 if (U_SUCCESS(*status
)) {
27 ures_getVersionByKey(icudatares
, U_ICU_DATA_KEY
, dataVersionFillin
, status
);
29 ures_close(icudatares
);