Skip to content

Commit

Permalink
Remove unused parameter from get_code_base call (#54959)
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-safar authored Jun 30, 2021
1 parent a1feef9 commit 815d32d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public override string? CodeBase
{
get
{
return get_code_base(this, false);
return get_code_base(this);
}
}

Expand Down Expand Up @@ -467,7 +467,7 @@ internal static RuntimeAssembly InternalLoad(AssemblyName assemblyRef, ref Stack
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);
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/icall-def-netcore.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
11 changes: 3 additions & 8 deletions src/mono/mono/metadata/icall.c
Original file line number Diff line number Diff line change
Expand Up @@ -4459,7 +4459,7 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssemblyHand
}

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;
Expand All @@ -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);

Expand Down

0 comments on commit 815d32d

Please sign in to comment.