Skip to content

Conversation

@jkoritzinsky
Copy link
Member

Fixes #61

@jkoritzinsky jkoritzinsky requested a review from Scottj1s February 7, 2020 21:33
var inspectable = MarshalInspectable.CreateMarshaler(value, true);

return _As(inspectable);
}
Copy link
Member

Choose a reason for hiding this comment

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

this code now exists in triplicate (largely). can we refactor and share it from MarshalGeneric?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll take a look and see if there's a good way to refactor it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've refactored these two to be shared. I don't want to also include the struct one since we'd end up losing some perf (and it was make the design slightly more obtuse) since that one will require using typeof() and the System.Runtime.InteropServices.Marshal class which is known to not have the best performance.

Copy link
Member

Choose a reason for hiding this comment

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

awesome

@Scottj1s Scottj1s merged commit 1f2aa19 into master Feb 8, 2020
@Scottj1s Scottj1s deleted the jkoritzinsky/array-of-interface-managed-to-abi branch February 8, 2020 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marshalling Arrays of Interfaces to ABI selects the incorrect marshaler

3 participants