This fixes about 20 tests for funcs that return boolean values.
In swift land, booleans are return only in the bottom bit and apparently .NET 7 doesn't handle things quite the same way as Xamarin did. Oops.
I fixed this by changing the statically bound methods that return bool to have [return: MarshalAs (UnmanagedType.I1)] and added code to the pinvoke generator which will attach that attribute to the pinvokes that return bool. In the process, I added a convenience factory method to CSAttribute which makes it easier to generate an attribute as a one-liner.
This fixes about 20 tests for funcs that return boolean values. In swift land, booleans are return only in the bottom bit and apparently .NET 7 doesn't handle things quite the same way as Xamarin did. Oops.
I fixed this by changing the statically bound methods that return bool to have
[return: MarshalAs (UnmanagedType.I1)]
and added code to the pinvoke generator which will attach that attribute to the pinvokes that return bool. In the process, I added a convenience factory method toCSAttribute
which makes it easier to generate an attribute as a one-liner.