updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / python2-pyicu / icu-4.8.patch
blobe3d4cd12532ae7186d5f7fd50c6877858569dd3b
1 Index: format.cpp
2 ===================================================================
3 --- format.cpp (revision 176)
4 +++ format.cpp (revision 177)
5 @@ -31,6 +31,10 @@
6 #include "dateformat.h"
7 #include "numberformat.h"
9 +#if U_ICU_VERSION_HEX >= 0x04080000
10 + DECLARE_CONSTANTS_TYPE(UTimeUnitFormatStyle);
11 +#endif
13 /* FieldPosition */
15 class t_fieldposition : public _wrapper {
16 @@ -728,7 +732,11 @@
17 static int t_timeunitformat_init(t_timeunitformat *self,
18 PyObject *args, PyObject *kwds)
20 +#if U_ICU_VERSION_HEX >= 0x04080000
21 + UTimeUnitFormatStyle style;
22 +#else
23 TimeUnitFormat::EStyle style;
24 +#endif
25 Locale *locale;
27 switch (PyTuple_Size(args)) {
28 @@ -1659,8 +1667,13 @@
30 INSTALL_STATIC_INT(FieldPosition, DONT_CARE);
32 -#if U_ICU_VERSION_HEX >= 0x04020000
33 +#if U_ICU_VERSION_HEX >= 0x04020000 && U_ICU_VERSION_HEX < 0x04080000
34 INSTALL_STATIC_INT(TimeUnitFormat, kFull);
35 INSTALL_STATIC_INT(TimeUnitFormat, kAbbreviate);
36 #endif
37 +#if U_ICU_VERSION_HEX >= 0x04080000
38 + INSTALL_CONSTANTS_TYPE(UTimeUnitFormatStyle, m);
39 + INSTALL_ENUM(UTimeUnitFormatStyle, "FULL", UTMUTFMT_FULL_STYLE);
40 + INSTALL_ENUM(UTimeUnitFormatStyle, "ABBREVIATED", UTMUTFMT_ABBREVIATED_STYLE);
41 +#endif
43 Index: numberformat.cpp
44 ===================================================================
45 --- numberformat.cpp (revision 176)
46 +++ numberformat.cpp (revision 177)
47 @@ -30,6 +30,10 @@
48 #include "numberformat.h"
49 #include "macros.h"
51 +#if U_ICU_VERSION_HEX >= 0x04080000
52 + DECLARE_CONSTANTS_TYPE(UCurrencySpacing);
53 +#endif
55 /* DecimalFormatSymbols */
57 class t_decimalformatsymbols : public _wrapper {
58 @@ -494,7 +498,11 @@
60 static PyObject *t_decimalformatsymbols_getPatternForCurrencySpacing(t_decimalformatsymbols *self, PyObject *args)
62 +#if U_ICU_VERSION_HEX >= 0x04080000
63 + UCurrencySpacing type;
64 +#else
65 DecimalFormatSymbols::ECurrencySpacing type;
66 +#endif
67 UBool beforeCurrency;
69 if (!parseArgs(args, "ib", &type, &beforeCurrency))
70 @@ -510,7 +518,11 @@
71 static PyObject *t_decimalformatsymbols_setPatternForCurrencySpacing(t_decimalformatsymbols *self, PyObject *args)
73 UnicodeString *u, _u;
74 +#if U_ICU_VERSION_HEX >= 0x04080000
75 + UCurrencySpacing type;
76 +#else
77 DecimalFormatSymbols::ECurrencySpacing type;
78 +#endif
79 UBool beforeCurrency;
81 if (!parseArgs(args, "ibS", &type, &beforeCurrency, &u, &_u))
82 @@ -2278,12 +2290,18 @@
83 INSTALL_STATIC_INT(DecimalFormatSymbols, kNaNSymbol);
84 INSTALL_STATIC_INT(DecimalFormatSymbols, kSignificantDigitSymbol);
86 -#if U_ICU_VERSION_HEX >= 0x04020000
87 +#if U_ICU_VERSION_HEX >= 0x04020000 && U_ICU_VERSION_HEX < 0x04080000
88 INSTALL_STATIC_INT(DecimalFormatSymbols, kCurrencyMatch);
89 INSTALL_STATIC_INT(DecimalFormatSymbols, kSurroundingMatch);
90 INSTALL_STATIC_INT(DecimalFormatSymbols, kInsert);
91 INSTALL_STATIC_INT(DecimalFormatSymbols, kCurrencySpacingCount);
92 #endif
93 +#if U_ICU_VERSION_HEX >= 0x04080000
94 + INSTALL_CONSTANTS_TYPE(UCurrencySpacing, m);
95 + INSTALL_ENUM(UCurrencySpacing, "MATCH", UNUM_CURRENCY_MATCH);
96 + INSTALL_ENUM(UCurrencySpacing, "SURROUNDING_MATCH", UNUM_CURRENCY_SURROUNDING_MATCH);
97 + INSTALL_ENUM(UCurrencySpacing, "INSERT", UNUM_CURRENCY_INSERT);
98 +#endif
100 INSTALL_STATIC_INT(NumberFormat, kIntegerField);
101 INSTALL_STATIC_INT(NumberFormat, kFractionField);