Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / metadata / locales.c
index 6e43ddf730a3af148eb439892ae5534358aa3c6b..b0e6135f49a931befbff87178a53a3be7e93953a 100644 (file)
@@ -581,19 +581,19 @@ get_current_locale_name (void)
        return ret;
 }
 
-MonoString*
-ves_icall_System_Globalization_CultureInfo_get_current_locale_name (void)
+MonoStringHandle
+ves_icall_System_Globalization_CultureInfo_get_current_locale_name (MonoError *error)
 {
+       error_init (error);
        gchar *locale;
-       MonoString* ret;
        MonoDomain *domain;
 
        locale = get_current_locale_name ();
        if (locale == NULL)
-               return NULL;
+               return MONO_HANDLE_CAST (MonoString, NULL_HANDLE);
 
        domain = mono_domain_get ();
-       ret = mono_string_new (domain, locale);
+       MonoStringHandle ret = mono_string_new_handle (domain, locale, error);
        g_free (locale);
 
        return ret;
@@ -966,14 +966,16 @@ static gint32 string_invariant_indexof_char (MonoString *source, gint32 sindex,
 }
 
 void ves_icall_System_Text_Normalization_load_normalization_resource (guint8 **argProps,
-                                                                                                                                         guint8 **argMappedChars,
-                                                                                                                                         guint8 **argCharMapIndex,
-                                                                                                                                         guint8 **argHelperIndex,
-                                                                                                                                         guint8 **argMapIdxToComposite,
-                                                                                                                                         guint8 **argCombiningClass)
+                                                                     guint8 **argMappedChars,
+                                                                     guint8 **argCharMapIndex,
+                                                                     guint8 **argHelperIndex,
+                                                                     guint8 **argMapIdxToComposite,
+                                                                     guint8 **argCombiningClass,
+                                                                     MonoError *error)
 {
+       error_init (error);
 #ifdef DISABLE_NORMALIZATION
-       mono_set_pending_exception (mono_get_exception_not_supported ("This runtime has been compiled without string normalization support."));
+       mono_error_set_not_supported (error, "This runtime has been compiled without string normalization support.");
        return;
 #else
        *argProps = (guint8*)props;