Path: blob/master/thirdparty/icu4c/common/icudataver.cpp
9902 views
// © 2016 and later: Unicode, Inc. and others.1// License & terms of use: http://www.unicode.org/copyright.html2/*3******************************************************************************4*5* Copyright (C) 2009-2011, International Business Machines6* Corporation and others. All Rights Reserved.7*8******************************************************************************9*/1011#include "unicode/utypes.h"12#include "unicode/icudataver.h"13#include "unicode/ures.h"14#include "uresimp.h" /* for ures_getVersionByKey */1516U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status) {17UResourceBundle *icudatares = nullptr;1819if (U_FAILURE(*status)) {20return;21}2223if (dataVersionFillin != nullptr) {24icudatares = ures_openDirect(nullptr, U_ICU_VERSION_BUNDLE , status);25if (U_SUCCESS(*status)) {26ures_getVersionByKey(icudatares, U_ICU_DATA_KEY, dataVersionFillin, status);27}28ures_close(icudatares);29}30}313233