]> git.pld-linux.org Git - packages/icu.git/blame - ucol_getKeywordValuesForLocale-ulist_resetList.diff
Backport fix for upstream bug #12827 causing new gnome-shell to crash. Release 2
[packages/icu.git] / ucol_getKeywordValuesForLocale-ulist_resetList.diff
CommitLineData
e52c2e3b
MB
1https://ssl.icu-project.org/trac/ticket/12827
2https://ssl.icu-project.org/trac/changeset/39484 (Excluding test-related bits
3because we remove the "test" directory before applying the ICU patches.)
4
5Index: /intl/icu/source/common/ulist.c
6===================================================================
7--- a/source/common/ulist.c (revision 39483)
8+++ b/source/common/ulist.c (revision 39484)
9@@ -30,5 +30,4 @@
10
11 int32_t size;
12- int32_t currentIndex;
13 };
14
15@@ -52,5 +51,4 @@
16 newList->tail = NULL;
17 newList->size = 0;
18- newList->currentIndex = -1;
19
20 return newList;
21@@ -81,6 +79,7 @@
22 p->next->previous = p->previous;
23 }
24- list->curr = NULL;
25- list->currentIndex = 0;
26+ if (p == list->curr) {
27+ list->curr = p->next;
28+ }
29 --list->size;
30 if (p->forceDelete) {
31@@ -151,5 +150,4 @@
32 list->head->previous = newItem;
33 list->head = newItem;
34- list->currentIndex++;
35 }
36
37@@ -194,5 +192,4 @@
38 curr = list->curr;
39 list->curr = curr->next;
40- list->currentIndex++;
41
42 return curr->data;
43@@ -210,5 +207,4 @@
44 if (list != NULL) {
45 list->curr = list->head;
46- list->currentIndex = 0;
47 }
48 }
49@@ -273,3 +269,2 @@
50 return (UList *)(en->context);
51 }
52-
53Index: /intl/icu/source/i18n/ucol_res.cpp
54===================================================================
55--- a/source/i18n/ucol_res.cpp (revision 39483)
56+++ b/source/i18n/ucol_res.cpp (revision 39484)
57@@ -681,4 +681,5 @@
58 }
59 memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));
60+ ulist_resetList(sink.values); // Initialize the iterator.
61 en->context = sink.values;
62 sink.values = NULL; // Avoid deletion in the sink destructor.
This page took 0.113096 seconds and 4 git commands to generate.