michael@0: /* michael@0: ****************************************************************************** michael@0: * michael@0: * Copyright (C) 2009-2011, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: * michael@0: ****************************************************************************** michael@0: */ michael@0: michael@0: #include "unicode/utypes.h" michael@0: #include "unicode/icudataver.h" michael@0: #include "unicode/ures.h" michael@0: #include "uresimp.h" /* for ures_getVersionByKey */ michael@0: michael@0: U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status) { michael@0: UResourceBundle *icudatares = NULL; michael@0: michael@0: if (U_FAILURE(*status)) { michael@0: return; michael@0: } michael@0: michael@0: if (dataVersionFillin != NULL) { michael@0: icudatares = ures_openDirect(NULL, U_ICU_VERSION_BUNDLE , status); michael@0: if (U_SUCCESS(*status)) { michael@0: ures_getVersionByKey(icudatares, U_ICU_DATA_KEY, dataVersionFillin, status); michael@0: } michael@0: ures_close(icudatares); michael@0: } michael@0: }