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

Refactor ComponentActivator #37784

Merged
merged 5 commits into from
Jun 13, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Rely on PtrToStringAuto to call Uni or UTF8
  • Loading branch information
rseanhall committed Jun 12, 2020
commit e4da064192d585eb2e1daf13be49c56550b58528
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ public static class ComponentActivator

private static string MarshalToString(IntPtr arg, string argName)
{
#if TARGET_WINDOWS
string? result = Marshal.PtrToStringUni(arg);
#else
string? result = Marshal.PtrToStringUTF8(arg);
#endif

string? result = Marshal.PtrToStringAuto(arg);
if (result == null)
{
throw new ArgumentNullException(argName);
Expand Down