Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused parameter from get_code_base call #54959

Merged
merged 1 commit into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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