Merge pull request #71825 from RedworkDE/net6-roll-forward

C#: Allow use of .NET 7
This commit is contained in:
Rémi Verschelde 2023-01-27 00:13:54 +01:00
commit 2edef2a795
No known key found for this signature in database
GPG key ID: C3336907360768E1
2 changed files with 4 additions and 3 deletions

View file

@ -8,6 +8,7 @@
<!-- To generate the .runtimeconfig.json file-->
<EnableDynamicLoading>true</EnableDynamicLoading>
<RollForward>LatestMajor</RollForward>
</PropertyGroup>
<ItemGroup>

View file

@ -104,7 +104,7 @@ namespace Godot.NativeInterop
}
}
[StructLayout(LayoutKind.Explicit)]
[StructLayout(LayoutKind.Sequential, Pack = 8)]
// ReSharper disable once InconsistentNaming
public ref struct godot_variant
{
@ -113,11 +113,11 @@ namespace Godot.NativeInterop
=> (godot_variant*)Unsafe.AsPointer(ref Unsafe.AsRef(in _typeField));
// Variant.Type is generated as an enum of type long, so we can't use for the field as it must only take 32-bits.
[FieldOffset(0)] private int _typeField;
private int _typeField;
// There's padding here
[FieldOffset(8)] private godot_variant_data _data;
private godot_variant_data _data;
[StructLayout(LayoutKind.Explicit)]
// ReSharper disable once InconsistentNaming