Author: gonzalo
Date: 2005-05-06 18:27:50 -0400 (Fri, 06 May 2005)
New Revision: 44174
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/locales.c
Log:
2005-05-06 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* locales.c:
(internal_get_cultures): reserve the first slot of the array for the
InvariantCulture, which will be filled in managed code.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2005-05-06 22:27:49 UTC (rev 44173)
+++ trunk/mono/mono/metadata/ChangeLog 2005-05-06 22:27:50 UTC (rev 44174)
@@ -1,3 +1,9 @@
+2005-05-06 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * locales.c:
+ (internal_get_cultures): reserve the first slot of the array for the
+ InvariantCulture, which will be filled in managed code.
+
2005-05-06 Zoltan Varga <[EMAIL PROTECTED]>
* reflection.c (mono_image_fill_module_table): Initialize the
Modified: trunk/mono/mono/metadata/locales.c
===================================================================
--- trunk/mono/mono/metadata/locales.c 2005-05-06 22:27:49 UTC (rev 44173)
+++ trunk/mono/mono/metadata/locales.c 2005-05-06 22:27:50 UTC (rev 44174)
@@ -460,12 +460,21 @@
class = mono_class_from_name (mono_get_corlib (),
"System.Globalization", "CultureInfo");
+
+ /* The InvariantCulture is not in culture_entries */
+ /* We reserve the first slot in the array for it */
+ if (neutral)
+ len++;
+
ret = mono_array_new (domain, class, len);
if (len == 0)
return ret;
len = 0;
+ if (neutral)
+ mono_array_set (ret, MonoCultureInfo *, len++, NULL);
+
for (i = 0; i < NUM_CULTURE_ENTRIES; i++) {
ci = &culture_entries [i];
is_neutral = ((ci->lcid & 0xff00) == 0 || ci->specific_lcid ==
0);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches