You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NONE of or users expect to have to change all their bindings that take a boolean to take a byte and do a wrap with hasFullSizeContent ? (byte) 1 : (byte) 0.
Either the test is wrong or the generator needs to be able to deal with the boolean parameter without asking the user to do the conversion to a byte.
The text was updated successfully, but these errors were encountered:
…marin#18685.
This means:
* Change all bool and char arguments in P/Invokes to be byte and ushort, respectively.
* Change all out/ref arguments to be pointers instead.
* Update managed binding code accordingly.
* Update a struct (GKTriangle) to not use a MarshalAs field, but instead only use blittable fields.
* Update tests accordingly.
Fixesxamarin#18685.
…8685. (#19034)
This means:
* Change all bool and char arguments in P/Invokes to be byte and ushort, respectively.
* Change all out/ref arguments to be pointers instead.
* Update managed binding code accordingly.
* Update a struct (GKTriangle) to not use a MarshalAs field, but instead only use blittable fields.
* Update tests accordingly.
One side effect is that legacy binding projects may need a reference to
the `System.Runtime.CompilerServices.Unsafe` NuGet now (this is a
built-in dependency in .NET) in order to compile successfully.
Fixes#18685.
When we did not need to worry about NativeAOT we could write a binding in the following way:
Yet, now the above code will result in the following cecil test failure:
You can see that one of the offending methods is:
A workaround to the issue is to change the binding to the following:
NONE of or users expect to have to change all their bindings that take a boolean to take a byte and do a wrap with
hasFullSizeContent ? (byte) 1 : (byte) 0
.Either the test is wrong or the generator needs to be able to deal with the boolean parameter without asking the user to do the conversion to a byte.
The text was updated successfully, but these errors were encountered: