Chromium Code Reviews

Side by Side Diff: source/common/udata.cpp

Issue 822213003: ICU upgrade to 54.1 step 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: readme: better wrapping, declspec patch dropped Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « source/common/ucmndata.h ('k') | source/common/unicode/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ****************************************************************************** 2 ******************************************************************************
3 * 3 *
4 * Copyright (C) 1999-2014, International Business Machines 4 * Copyright (C) 1999-2014, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ****************************************************************************** 7 ******************************************************************************
8 * file name: udata.cpp 8 * file name: udata.cpp
9 * encoding: US-ASCII 9 * encoding: US-ASCII
10 * tab size: 8 (not used) 10 * tab size: 8 (not used)
(...skipping 602 matching lines...)
613 /* ============================================================================= =====*/ 613 /* ============================================================================= =====*/
614 614
615 615
616 /*----------------------------------------------------------------------* 616 /*----------------------------------------------------------------------*
617 * * 617 * *
618 * Add a static reference to the common data library * 618 * Add a static reference to the common data library *
619 * Unless overridden by an explicit udata_setCommonData, this will be * 619 * Unless overridden by an explicit udata_setCommonData, this will be *
620 * our common data. * 620 * our common data. *
621 * * 621 * *
622 *----------------------------------------------------------------------*/ 622 *----------------------------------------------------------------------*/
623 extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; 623 extern "C" const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT;
624 624
625 /* 625 /*
626 * This would be a good place for weak-linkage declarations of 626 * This would be a good place for weak-linkage declarations of
627 * partial-data-library access functions where each returns a pointer 627 * partial-data-library access functions where each returns a pointer
628 * to its data package, if it is linked in. 628 * to its data package, if it is linked in.
629 */ 629 */
630 /* 630 /*
631 extern const void *uprv_getICUData_collation(void) ATTRIBUTE_WEAK; 631 extern const void *uprv_getICUData_collation(void) ATTRIBUTE_WEAK;
632 extern const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK; 632 extern const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK;
633 */ 633 */
(...skipping 25 matching lines...)
659 659
660 /* ??????? TODO revisit this */ 660 /* ??????? TODO revisit this */
661 if (commonDataIndex >= 0) { 661 if (commonDataIndex >= 0) {
662 /* "mini-cache" for common ICU data */ 662 /* "mini-cache" for common ICU data */
663 if(commonDataIndex >= UPRV_LENGTHOF(gCommonICUDataArray)) { 663 if(commonDataIndex >= UPRV_LENGTHOF(gCommonICUDataArray)) {
664 return NULL; 664 return NULL;
665 } 665 }
666 if(gCommonICUDataArray[commonDataIndex] == NULL) { 666 if(gCommonICUDataArray[commonDataIndex] == NULL) {
667 int32_t i; 667 int32_t i;
668 for(i = 0; i < commonDataIndex; ++i) { 668 for(i = 0; i < commonDataIndex; ++i) {
669 if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) { 669 if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT.hdr ) {
670 /* The linked-in data is already in the list. */ 670 /* The linked-in data is already in the list. */
671 return NULL; 671 return NULL;
672 } 672 }
673 } 673 }
674 674
675 /* Add the linked-in data to the list. */ 675 /* Add the linked-in data to the list. */
676 /* 676 /*
677 * This is where we would check and call weakly linked partial-data- library 677 * This is where we would check and call weakly linked partial-data- library
678 * access functions. 678 * access functions.
679 */ 679 */
680 /* 680 /*
681 if (uprv_getICUData_collation) { 681 if (uprv_getICUData_collation) {
682 setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErr orCode); 682 setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErr orCode);
683 } 683 }
684 if (uprv_getICUData_conversion) { 684 if (uprv_getICUData_conversion) {
685 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pEr rorCode); 685 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pEr rorCode);
686 } 686 }
687 */ 687 */
688 setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); 688 setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT.hdr, FALSE, pErrorCod e);
689 } 689 }
690 return gCommonICUDataArray[commonDataIndex]; 690 return gCommonICUDataArray[commonDataIndex];
691 } 691 }
692 692
693 693
694 /* request is NOT for ICU Data. */ 694 /* request is NOT for ICU Data. */
695 695
696 /* Find the base name portion of the supplied path. */ 696 /* Find the base name portion of the supplied path. */
697 /* inBasename will be left pointing somewhere within the original path str ing. */ 697 /* inBasename will be left pointing somewhere within the original path str ing. */
698 inBasename = findBasename(path); 698 inBasename = findBasename(path);
(...skipping 694 matching lines...)
1393 pInfo->size=0; 1393 pInfo->size=0;
1394 } 1394 }
1395 } 1395 }
1396 } 1396 }
1397 1397
1398 1398
1399 U_CAPI void U_EXPORT2 udata_setFileAccess(UDataFileAccess access, UErrorCode * / *status*/) 1399 U_CAPI void U_EXPORT2 udata_setFileAccess(UDataFileAccess access, UErrorCode * / *status*/)
1400 { 1400 {
1401 gDataFileAccess = access; 1401 gDataFileAccess = access;
1402 } 1402 }
OLDNEW
« no previous file with comments | « source/common/ucmndata.h ('k') | source/common/unicode/platform.h » ('j') | no next file with comments »

Powered by Google App Engine