From d78ae54255ac36905d077ff64e93f6742c580d51 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 27 Jun 2023 11:37:15 +0200 Subject: [PATCH] [marshal methods] Add support for wrapping the `char` type `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. --- .../MarshalMethodsAssemblyRewriter.cs | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsAssemblyRewriter.cs b/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsAssemblyRewriter.cs index acd69f2d7ea..0c08312b436 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsAssemblyRewriter.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethodsAssemblyRewriter.cs @@ -195,7 +195,7 @@ MethodDefinition GenerateWrapper (MarshalMethodEntry method, Dictionary