Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Add a few more built-in marshallers - #831

Merged
jkotas merged 1 commit into
dotnet:masterfrom
jkotas:more-marshallers
Feb 9, 2016
Merged

jkotas merged 1 commit into
dotnet:masterfrom
jkotas:more-marshallers

Conversation

@jkotas

@jkotas jkotas commented Feb 9, 2016

Copy link
Copy Markdown
Member

Add marshalling for SafeHandle and StringBuilder. It makes a simple I/O tests work.

@jkotas

jkotas commented Feb 9, 2016

Copy link
Copy Markdown
Member Author

Fixing #828 (w/ manually copied System.IO.* assemblies from corefx)

@jkotas

jkotas commented Feb 9, 2016

Copy link
Copy Markdown
Member Author

@jkotas

jkotas commented Feb 9, 2016

Copy link
Copy Markdown
Member Author

@dotnet-bot test this please


MethodDesc getLengthMethod = stringType.GetKnownMethod("get_Length", null);
MethodDesc getCharsMethod = stringType.GetKnownMethod("get_Chars", null);
_marshallingCodeStream.Emit(ILOpcode.call, _emitter.NewToken(stringToAnsi));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to handle the null string case somewhere.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed StringToAnsi helper to early out for null.

@MichalStrehovsky

Copy link
Copy Markdown
Member

LGTM otherwise

Add marshalling for SafeHandle and StringBuilder. It makes a simple I/O tests work.
jkotas added a commit that referenced this pull request Feb 9, 2016
Add a few more built-in marshallers
@jkotas
jkotas merged commit 027123f into dotnet:master Feb 9, 2016
@jkotas
jkotas deleted the more-marshallers branch February 17, 2016 14:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants