intl/icu/source/common/icudataver.c

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 /*
     2 ******************************************************************************
     3 *
     4 *   Copyright (C) 2009-2011, International Business Machines
     5 *   Corporation and others.  All Rights Reserved.
     6 *
     7 ******************************************************************************
     8 */
    10 #include "unicode/utypes.h"
    11 #include "unicode/icudataver.h"
    12 #include "unicode/ures.h"
    13 #include "uresimp.h" /* for ures_getVersionByKey */
    15 U_CAPI void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status) {
    16     UResourceBundle *icudatares = NULL;
    18     if (U_FAILURE(*status)) {
    19         return;
    20     }
    22     if (dataVersionFillin != NULL) {
    23         icudatares = ures_openDirect(NULL, U_ICU_VERSION_BUNDLE , status);
    24         if (U_SUCCESS(*status)) {
    25             ures_getVersionByKey(icudatares, U_ICU_DATA_KEY, dataVersionFillin, status);
    26         }
    27         ures_close(icudatares);
    28     }
    29 }

mercurial