-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[marshal] Fix VARIANT marshaling in structs (#49451)
Partial revert of mono/mono#8732 If a managed struct is declared as public struct StructWithVariant { [MarshalAs (UnmanagedType.Struct)] public object data; }; Then the `data` field should be marshalled as a VARIANT. The fix checks that the field's type is `object` and uses VARIANT for marshaling, otherwise it continues as in mono/mono#8732 and uses MONO_MARSHAL_CONV_OBJECT_STRUCT. --- Also added tests for BSTR marshaling inside structs. This actually works on mono master thanks to mono/mono#19701 but there was no test covering this case. Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
- Loading branch information
1 parent
cb36239
commit 54d2b35
Showing
3 changed files
with
122 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters