2006-11-03 Dick Porter <dick@ximian.com>
[mono.git] / mono / metadata / verify.c
index c60d39e5310eb5b660541438f419dd99046d4db5..4c8a8ed54614739d1bccf35c80197d38d044b60d 100644 (file)
@@ -56,8 +56,8 @@ mono_free_verify_list (GSList *list)
                (list) = g_slist_prepend ((list), vinfo);       \
        } while (0)
 
-static const char* const
-valid_cultures[] = {
+static const char
+valid_cultures[][9] = {
        "ar-SA", "ar-IQ", "ar-EG", "ar-LY",
        "ar-DZ", "ar-MA", "ar-TN", "ar-OM",
        "ar-YE", "ar-SY", "ar-JO", "ar-LB",
@@ -92,8 +92,7 @@ valid_cultures[] = {
        "Lt-uz-UZ", "Cy-uz-UZ", "tt-TA", "pa-IN",
        "gu-IN", "ta-IN", "te-IN", "kn-IN",
        "mr-IN", "sa-IN", "mn-MN", "gl-ES",
-       "kok-IN", "syr-SY", "div-MV",
-       NULL
+       "kok-IN", "syr-SY", "div-MV"
 };
 
 static int
@@ -103,9 +102,11 @@ is_valid_culture (const char *cname)
        int found;
                        
        found = *cname == 0;
-       for (i = 0; !found && valid_cultures [i]; ++i) {
-               if (g_strcasecmp (valid_cultures [i], cname))
+       for (i = 0; i < G_N_ELEMENTS (valid_cultures); ++i) {
+               if (g_strcasecmp (valid_cultures [i], cname)) {
                        found = 1;
+                       break;
+               }
        }
        return found;
 }
@@ -2225,7 +2226,8 @@ methodbuilder_fields[] = {
        {"pinfo", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, pinfo)},
        {"pi_dll", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, dll)},
        {"pi_entry", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, dllentry)},
-       {"ncharset", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, charset)},
+       {"charset", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, charset)},
+       {"extra_flags", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, extra_flags)},
        {"native_cc", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, native_cc)},
        {"call_conv", G_STRUCT_OFFSET (MonoReflectionMethodBuilder, call_conv)},
        {NULL, 0}
@@ -2504,7 +2506,6 @@ wait_handle_fields[] = {
 static FieldDesc 
 thread_fields[] = {
        {"system_thread_handle", G_STRUCT_OFFSET (MonoThread, handle)},
-       {"current_culture", G_STRUCT_OFFSET (MonoThread, culture_info)},
        {"threadpool_thread", G_STRUCT_OFFSET (MonoThread, threadpool_thread)},
        {"state", G_STRUCT_OFFSET (MonoThread, state)},
        {"abort_exc", G_STRUCT_OFFSET (MonoThread, abort_exc)},
@@ -2539,10 +2540,10 @@ cinfo_fields[] = {
 
 static const FieldDesc
 dtfinfo_fields[] = {
-       {"_AMDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, AMDesignator)},
-       {"_PMDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, PMDesignator)},
-       {"_DayNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, DayNames)},
-       {"_MonthNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, MonthNames)},
+       {"amDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, AMDesignator)},
+       {"pmDesignator", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, PMDesignator)},
+       {"dayNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, DayNames)},
+       {"monthNames", G_STRUCT_OFFSET (MonoDateTimeFormatInfo, MonthNames)},
        {NULL, 0}
 };