From: Marek Safar Date: Wed, 30 Jun 2021 16:39:27 +0000 (+0200) Subject: Remove unused parameter from get_code_base call (#54959) X-Git-Tag: submit/tizen/20210909.063632~489 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=815d32de22ebccb72df25ebf63ee9ea6d186c79c;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove unused parameter from get_code_base call (#54959) --- diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs index 602cdc6..693f6c9 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs @@ -78,7 +78,7 @@ namespace System.Reflection { get { - return get_code_base(this, false); + return get_code_base(this); } } @@ -467,7 +467,7 @@ namespace System.Reflection private extern string get_location(); [MethodImplAttribute(MethodImplOptions.InternalCall)] - private static extern string get_code_base(Assembly a, bool escaped); + private static extern string? get_code_base(Assembly a); [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern string get_fullname(Assembly a); diff --git a/src/mono/mono/metadata/icall-def-netcore.h b/src/mono/mono/metadata/icall-def-netcore.h index 56b5804..e1fec10 100644 --- a/src/mono/mono/metadata/icall-def-netcore.h +++ b/src/mono/mono/metadata/icall-def-netcore.h @@ -270,7 +270,7 @@ HANDLES(RASSEM_6b, "GetTopLevelForwardedTypes", ves_icall_System_Reflection_Runt HANDLES(RASSEM_7, "InternalGetReferencedAssemblies", ves_icall_System_Reflection_Assembly_InternalGetReferencedAssemblies, GPtrArray_ptr, 1, (MonoReflectionAssembly)) HANDLES(RASSEM_8, "InternalImageRuntimeVersion", ves_icall_System_Reflection_RuntimeAssembly_InternalImageRuntimeVersion, MonoString, 1, (MonoReflectionAssembly)) HANDLES(RASSEM_9, "get_EntryPoint", ves_icall_System_Reflection_RuntimeAssembly_get_EntryPoint, MonoReflectionMethod, 1, (MonoReflectionAssembly)) -HANDLES(RASSEM_10, "get_code_base", ves_icall_System_Reflection_RuntimeAssembly_get_code_base, MonoString, 2, (MonoReflectionAssembly, MonoBoolean)) +HANDLES(RASSEM_10, "get_code_base", ves_icall_System_Reflection_RuntimeAssembly_get_code_base, MonoString, 1, (MonoReflectionAssembly)) HANDLES(RASSEM_11, "get_fullname", ves_icall_System_Reflection_RuntimeAssembly_get_fullname, MonoString, 1, (MonoReflectionAssembly)) HANDLES(RASSEM_12, "get_location", ves_icall_System_Reflection_RuntimeAssembly_get_location, MonoString, 1, (MonoReflectionAssembly)) diff --git a/src/mono/mono/metadata/icall.c b/src/mono/mono/metadata/icall.c index 51a8fc0..84fc4df 100644 --- a/src/mono/mono/metadata/icall.c +++ b/src/mono/mono/metadata/icall.c @@ -4459,7 +4459,7 @@ fail: } MonoStringHandle -ves_icall_System_Reflection_RuntimeAssembly_get_code_base (MonoReflectionAssemblyHandle assembly, MonoBoolean escaped, MonoError *error) +ves_icall_System_Reflection_RuntimeAssembly_get_code_base (MonoReflectionAssemblyHandle assembly, MonoError *error) { MonoAssembly *mass = MONO_HANDLE_GETVAL (assembly, assembly); gchar *absolute; @@ -4472,13 +4472,8 @@ ves_icall_System_Reflection_RuntimeAssembly_get_code_base (MonoReflectionAssembl mono_icall_make_platform_path (absolute); - gchar *uri; - if (escaped) { - uri = g_filename_to_uri (absolute, NULL, NULL); - } else { - const gchar *prepend = mono_icall_get_file_path_prefix (absolute); - uri = g_strconcat (prepend, absolute, (const char*)NULL); - } + const gchar *prepend = mono_icall_get_file_path_prefix (absolute); + gchar *uri = g_strconcat (prepend, absolute, (const char*)NULL); g_free (absolute);