[marshal methods] Add support for wrapping the char type#8146
[marshal methods] Add support for wrapping the char type#8146grendello wants to merge 1 commit intodotnet:mainfrom
char type#8146Conversation
`System.Char` is an unblittable type and, as such, it has to be treated specially by the marshal methods wrapper generator to properly cast it to/from a matching blittable type. In this case the latter is `ushort`, since both on the Java and Managed side, `char` is a 16-bit entity.
|
Why is Then there's the following section Blittable types when runtime marshalling is disabled:
which implies to me that |
|
@grendello: based on the URL scheme and the "banner" at the top of the link, I believe that the docs you referred to are for .NET Framework, not .NET. As such, I do not believe that this special-casing of |
|
@jonpryor it doesn't change for .NET https://learn.microsoft.com/en-us/dotnet/standard/native-interop/best-practices#blittable-types-when-runtime-marshalling-is-enabled, and also the docs in the previous link refer to the .NET Framework docs, so they're still valid I think. |
System.Charis an unblittable type and, as such, it has to be treatedspecially by the marshal methods wrapper generator to properly cast it
to/from a matching blittable type. In this case the latter is
ushort,since both on the Java and Managed side,
charis a 16-bit entity.