OLD | NEW |
1 Index: source/common/udata.c | 1 Index: source/common/udata.cpp |
2 =================================================================== | 2 =================================================================== |
3 --- source/common/udata.c» (revision 22653) | 3 --- source/common/udata.cpp» (revision 68397) |
4 +++ source/common/udata.c» (working copy) | 4 +++ source/common/udata.cpp» (working copy) |
5 @@ -709,7 +709,7 @@ | 5 @@ -610,7 +610,7 @@ |
6 * our common data. * | 6 * our common data. * |
7 * * | 7 * * |
8 *----------------------------------------------------------------------*/ | 8 *----------------------------------------------------------------------*/ |
9 -extern const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; | 9 -extern "C" const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT; |
10 +extern const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT; | 10 +extern "C" const ICU_Data_Header U_DATA_API U_ICUDATA_ENTRY_POINT; |
11 | 11 |
12 | 12 /* |
13 /*----------------------------------------------------------------------* | 13 * This would be a good place for weak-linkage declarations of |
14 @@ -745,7 +745,7 @@ | 14 @@ -656,7 +656,7 @@ |
15 return gCommonICUData; | 15 if(gCommonICUDataArray[commonDataIndex] == NULL) { |
| 16 int32_t i; |
| 17 for(i = 0; i < commonDataIndex; ++i) { |
| 18 - if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) { |
| 19 + if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT.hd
r) { |
| 20 /* The linked-in data is already in the list. */ |
| 21 return NULL; |
| 22 } |
| 23 @@ -675,7 +675,7 @@ |
| 24 setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pE
rrorCode); |
| 25 } |
| 26 */ |
| 27 - setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); |
| 28 + setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT.hdr, FALSE, pErrorCo
de); |
16 } | 29 } |
17 | 30 return gCommonICUDataArray[commonDataIndex]; |
18 - tData.pHeader = &U_ICUDATA_ENTRY_POINT; | 31 } |
19 + tData.pHeader = &U_ICUDATA_ENTRY_POINT.hdr; | |
20 udata_checkCommonData(&tData, pErrorCode); | |
21 setCommonICUData(&tData, NULL, FALSE, pErrorCode); | |
22 return gCommonICUData; | |
23 Index: source/common/ucmndata.h | 32 Index: source/common/ucmndata.h |
24 =================================================================== | 33 =================================================================== |
25 --- source/common/ucmndata.h» (revision 22653) | 34 --- source/common/ucmndata.h» (revision 68397) |
26 +++ source/common/ucmndata.h (working copy) | 35 +++ source/common/ucmndata.h (working copy) |
27 @@ -44,6 +44,20 @@ | 36 @@ -44,6 +44,20 @@ |
28 } DataHeader; | 37 } DataHeader; |
29 | 38 |
30 typedef struct { | 39 typedef struct { |
31 + DataHeader hdr; | 40 + DataHeader hdr; |
32 + char padding[8]; | 41 + char padding[8]; |
33 + uint32_t count, reserved; | 42 + uint32_t count, reserved; |
34 + /* | 43 + /* |
35 + const struct { | 44 + const struct { |
36 + const char *const name; | 45 + const char *const name; |
37 + const void *const data; | 46 + const void *const data; |
38 + } toc[1]; | 47 + } toc[1]; |
39 + */ | 48 + */ |
40 + int fakeNameAndData[4]; /* TODO: Change this header type from */ | 49 + int fakeNameAndData[4]; /* TODO: Change this header type from */ |
41 + /* pointerTOC to OffsetTOC. */ | 50 + /* pointerTOC to OffsetTOC. */ |
42 +} ICU_Data_Header; | 51 +} ICU_Data_Header; |
43 + | 52 + |
44 +typedef struct { | 53 +typedef struct { |
45 uint32_t nameOffset; | 54 uint32_t nameOffset; |
46 uint32_t dataOffset; | 55 uint32_t dataOffset; |
47 } UDataOffsetTOCEntry; | 56 } UDataOffsetTOCEntry; |
48 Index: source/stubdata/stubdata.c | 57 Index: source/stubdata/stubdata.c |
49 =================================================================== | 58 =================================================================== |
50 --- source/stubdata/stubdata.c» (revision 22653) | 59 --- source/stubdata/stubdata.c» (revision 68397) |
51 +++ source/stubdata/stubdata.c (working copy) | 60 +++ source/stubdata/stubdata.c (working copy) |
52 @@ -20,45 +20,34 @@ | 61 @@ -20,45 +20,34 @@ |
53 #include "unicode/utypes.h" | 62 #include "unicode/utypes.h" |
54 #include "unicode/udata.h" | 63 #include "unicode/udata.h" |
55 #include "unicode/uversion.h" | 64 #include "unicode/uversion.h" |
56 +#include "ucmndata.h" | 65 +#include "ucmndata.h" |
57 | 66 |
58 | 67 |
59 -typedef struct { | 68 -typedef struct { |
60 - uint16_t headerSize; | 69 - uint16_t headerSize; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 + sizeof(UChar), | 117 + sizeof(UChar), |
109 + 0, /* reserved */ | 118 + 0, /* reserved */ |
110 + { /* data format identifier */ | 119 + { /* data format identifier */ |
111 + 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ | 120 + 0x54, 0x6f, 0x43, 0x50}, /* "ToCP" */ |
112 + {1, 0, 0, 0}, /* format version major, minor, milli, micro */ | 121 + {1, 0, 0, 0}, /* format version major, minor, milli, micro */ |
113 + {0, 0, 0, 0} /* dataVersion */ | 122 + {0, 0, 0, 0} /* dataVersion */ |
114 + }, | 123 + }, |
115 }, | 124 }, |
116 {0,0,0,0,0,0,0,0}, /* Padding[8] */ | 125 {0,0,0,0,0,0,0,0}, /* Padding[8] */ |
117 0, /* count */ | 126 0, /* count */ |
OLD | NEW |