summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2016-11-08 18:02:35 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2016-11-08 18:03:28 +0100
commit9e4b712fcdec31668882dd52867d5cb50158098e (patch)
tree9a4d8316f2477dc095bc2976f7279cf143cb3e40 /dev-libs/icu/files
parentmedia-video/qgifer: fix dependencies, remove broken version (diff)
downloadgentoo-9e4b712fcdec31668882dd52867d5cb50158098e.tar.gz
gentoo-9e4b712fcdec31668882dd52867d5cb50158098e.tar.bz2
gentoo-9e4b712fcdec31668882dd52867d5cb50158098e.zip
dev-libs/icu: Revbump for bug 599142
Package-Manager: portage-2.3.2
Diffstat (limited to 'dev-libs/icu/files')
-rw-r--r--dev-libs/icu/files/icu-58.1-iterator.patch127
1 files changed, 127 insertions, 0 deletions
diff --git a/dev-libs/icu/files/icu-58.1-iterator.patch b/dev-libs/icu/files/icu-58.1-iterator.patch
new file mode 100644
index 000000000000..6f52375eb790
--- /dev/null
+++ b/dev-libs/icu/files/icu-58.1-iterator.patch
@@ -0,0 +1,127 @@
+source: http://bugs.icu-project.org/trac/changeset/39484/
+
+
+Index: icu/common/ulist.c
+===================================================================
+--- icu/common/ulist.c (revision 39483)
++++ icu/common/ulist.c (revision 39484)
+@@ -30,5 +30,4 @@
+
+ int32_t size;
+- int32_t currentIndex;
+ };
+
+@@ -52,5 +51,4 @@
+ newList->tail = NULL;
+ newList->size = 0;
+- newList->currentIndex = -1;
+
+ return newList;
+@@ -81,6 +79,7 @@
+ p->next->previous = p->previous;
+ }
+- list->curr = NULL;
+- list->currentIndex = 0;
++ if (p == list->curr) {
++ list->curr = p->next;
++ }
+ --list->size;
+ if (p->forceDelete) {
+@@ -151,5 +150,4 @@
+ list->head->previous = newItem;
+ list->head = newItem;
+- list->currentIndex++;
+ }
+
+@@ -194,5 +192,4 @@
+ curr = list->curr;
+ list->curr = curr->next;
+- list->currentIndex++;
+
+ return curr->data;
+@@ -210,5 +207,4 @@
+ if (list != NULL) {
+ list->curr = list->head;
+- list->currentIndex = 0;
+ }
+ }
+@@ -273,3 +269,2 @@
+ return (UList *)(en->context);
+ }
+-
+Index: icu/i18n/ucol_res.cpp
+===================================================================
+--- icu/i18n/ucol_res.cpp (revision 39483)
++++ icu/i18n/ucol_res.cpp (revision 39484)
+@@ -681,4 +681,5 @@
+ }
+ memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
++ ulist_resetList(sink.values); // Initialize the iterator.
+ en->context = sink.values;
+ sink.values = NULL; // Avoid deletion in the sink destructor.
+Index: icu/test/intltest/apicoll.cpp
+===================================================================
+--- icu/test/intltest/apicoll.cpp (revision 39483)
++++ icu/test/intltest/apicoll.cpp (revision 39484)
+@@ -82,14 +82,7 @@
+ col = Collator::createInstance(Locale::getEnglish(), success);
+ if (U_FAILURE(success)){
+- errcheckln(success, "Default Collator creation failed. - %s", u_errorName(success));
+- return;
+- }
+-
+- StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success);
+- if (U_FAILURE(success)){
+- errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success));
+- return;
+- }
+- delete kwEnum;
++ errcheckln(success, "English Collator creation failed. - %s", u_errorName(success));
++ return;
++ }
+
+ col->getVersion(versionArray);
+@@ -230,4 +223,27 @@
+ delete aFrCol;
+ delete junk;
++}
++
++void CollationAPITest::TestKeywordValues() {
++ IcuTestErrorCode errorCode(*this, "TestKeywordValues");
++ LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));
++ if (errorCode.logIfFailureAndReset("English Collator creation failed")) {
++ return;
++ }
++
++ LocalPointer<StringEnumeration> kwEnum(
++ col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode));
++ if (errorCode.logIfFailureAndReset("Get Keyword Values for English Collator failed")) {
++ return;
++ }
++ assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0);
++ const char *kw;
++ UBool hasStandard = FALSE;
++ while ((kw = kwEnum->next(NULL, errorCode)) != NULL) {
++ if (strcmp(kw, "standard") == 0) {
++ hasStandard = TRUE;
++ }
++ }
++ assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard);
+ }
+
+@@ -2467,4 +2483,5 @@
+ TESTCASE_AUTO_BEGIN;
+ TESTCASE_AUTO(TestProperty);
++ TESTCASE_AUTO(TestKeywordValues);
+ TESTCASE_AUTO(TestOperators);
+ TESTCASE_AUTO(TestDuplicate);
+Index: icu/test/intltest/apicoll.h
+===================================================================
+--- icu/test/intltest/apicoll.h (revision 39483)
++++ icu/test/intltest/apicoll.h (revision 39484)
+@@ -36,4 +36,5 @@
+ */
+ void TestProperty(/* char* par */);
++ void TestKeywordValues();
+
+ /**