Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

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

Issue 2442923002: ICU update to 58 part 2 (Closed)
Patch Set: apply more patches and updates; almost ready to roll Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/ucnv_u32.c ('k') | source/common/unicode/utypes.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 // Copyright (C) 2016 and later: Unicode, Inc. and others. 1 // Copyright (C) 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html 2 // License & terms of use: http://www.unicode.org/copyright.html
3 /* 3 /*
4 ****************************************************************************** 4 ******************************************************************************
5 * 5 *
6 * Copyright (C) 1999-2016, International Business Machines 6 * Copyright (C) 1999-2016, International Business Machines
7 * Corporation and others. All Rights Reserved. 7 * Corporation and others. All Rights Reserved.
8 * 8 *
9 ****************************************************************************** 9 ******************************************************************************
10 * file name: udata.cpp 10 * file name: udata.cpp
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 /* ============================================================================= =====*/ 617 /* ============================================================================= =====*/
618 618
619 619
620 /*----------------------------------------------------------------------* 620 /*----------------------------------------------------------------------*
621 * * 621 * *
622 * Add a static reference to the common data library * 622 * Add a static reference to the common data library *
623 * Unless overridden by an explicit udata_setCommonData, this will be * 623 * Unless overridden by an explicit udata_setCommonData, this will be *
624 * our common data. * 624 * our common data. *
625 * * 625 * *
626 *----------------------------------------------------------------------*/ 626 *----------------------------------------------------------------------*/
627 extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; 627 extern "C" const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT;
628 628
629 /* 629 /*
630 * This would be a good place for weak-linkage declarations of 630 * This would be a good place for weak-linkage declarations of
631 * partial-data-library access functions where each returns a pointer 631 * partial-data-library access functions where each returns a pointer
632 * to its data package, if it is linked in. 632 * to its data package, if it is linked in.
633 */ 633 */
634 /* 634 /*
635 extern const void *uprv_getICUData_collation(void) ATTRIBUTE_WEAK; 635 extern const void *uprv_getICUData_collation(void) ATTRIBUTE_WEAK;
636 extern const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK; 636 extern const void *uprv_getICUData_conversion(void) ATTRIBUTE_WEAK;
637 */ 637 */
(...skipping 29 matching lines...) Expand all
667 if(commonDataIndex >= UPRV_LENGTHOF(gCommonICUDataArray)) { 667 if(commonDataIndex >= UPRV_LENGTHOF(gCommonICUDataArray)) {
668 return NULL; 668 return NULL;
669 } 669 }
670 { 670 {
671 Mutex lock; 671 Mutex lock;
672 if(gCommonICUDataArray[commonDataIndex] != NULL) { 672 if(gCommonICUDataArray[commonDataIndex] != NULL) {
673 return gCommonICUDataArray[commonDataIndex]; 673 return gCommonICUDataArray[commonDataIndex];
674 } 674 }
675 int32_t i; 675 int32_t i;
676 for(i = 0; i < commonDataIndex; ++i) { 676 for(i = 0; i < commonDataIndex; ++i) {
677 if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) { 677 if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT.hdr ) {
678 /* The linked-in data is already in the list. */ 678 /* The linked-in data is already in the list. */
679 return NULL; 679 return NULL;
680 } 680 }
681 } 681 }
682 } 682 }
683 683
684 /* Add the linked-in data to the list. */ 684 /* Add the linked-in data to the list. */
685 /* 685 /*
686 * This is where we would check and call weakly linked partial-data-libr ary 686 * This is where we would check and call weakly linked partial-data-libr ary
687 * access functions. 687 * access functions.
688 */ 688 */
689 /* 689 /*
690 if (uprv_getICUData_collation) { 690 if (uprv_getICUData_collation) {
691 setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErrorCo de); 691 setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErrorCo de);
692 } 692 }
693 if (uprv_getICUData_conversion) { 693 if (uprv_getICUData_conversion) {
694 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pErrorC ode); 694 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pErrorC ode);
695 } 695 }
696 */ 696 */
697 setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); 697 setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT.hdr, FALSE, pErrorCode);
698 { 698 {
699 Mutex lock; 699 Mutex lock;
700 return gCommonICUDataArray[commonDataIndex]; 700 return gCommonICUDataArray[commonDataIndex];
701 } 701 }
702 } 702 }
703 703
704 704
705 /* request is NOT for ICU Data. */ 705 /* request is NOT for ICU Data. */
706 706
707 /* Find the base name portion of the supplied path. */ 707 /* Find the base name portion of the supplied path. */
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 } 1408 }
1409 } 1409 }
1410 } 1410 }
1411 1411
1412 1412
1413 U_CAPI void U_EXPORT2 udata_setFileAccess(UDataFileAccess access, UErrorCode * / *status*/) 1413 U_CAPI void U_EXPORT2 udata_setFileAccess(UDataFileAccess access, UErrorCode * / *status*/)
1414 { 1414 {
1415 // Note: this function is documented as not thread safe. 1415 // Note: this function is documented as not thread safe.
1416 gDataFileAccess = access; 1416 gDataFileAccess = access;
1417 } 1417 }
OLDNEW
« no previous file with comments | « source/common/ucnv_u32.c ('k') | source/common/unicode/utypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698