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

Implement marshallers for Span and ReadOnlySpan #1222

Merged
merged 7 commits into from
Jun 12, 2021

Conversation

jkoritzinsky
Copy link
Member

Implement marshallers for Span and ReadOnlySpan to show the extensibility model for a new interop type.

When we move in-box, we can annotate Span<T> and ReadOnlySpan<T> with [NativeMarshalling] attributes pointing to their default marshallers and remove some of the [MarshalUsing] attributes.

@jkoritzinsky jkoritzinsky merged commit e9876f3 into dotnet:feature/DllImportGenerator Jun 12, 2021
@jkoritzinsky jkoritzinsky deleted the span branch June 12, 2021 00:16
jkoritzinsky added a commit to jkoritzinsky/runtime that referenced this pull request Sep 20, 2021
* Implement marshallers for Span/ReadOnlySpan.

* Add tests for span marshalling.

* Remove unused code.

* PR feedback.

* Use dotnet/runtime style.

* Fix allocation size in ReadOnlySpanMarshaller<T>.

Commit migrated from dotnet/runtimelab@e9876f3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DllImportGenerator Source Generated stubs for P/Invokes in C#
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants