Skip to content

Commit

Permalink
Maintenance: add .NET 8 targets to Core.csproj and Decompiler.csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
uxmal committed Feb 15, 2024
1 parent 6cac1b7 commit d68b9b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyName>Reko.Core</AssemblyName>
<RootNamespace>Reko.Core</RootNamespace>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks >
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<Configurations>Debug;Release</Configurations>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Expand Down
6 changes: 5 additions & 1 deletion src/Core/IO/SpanStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,12 @@ public override int Read(byte[] buffer, int offset, int count) {

public unsafe void Write<T>(T value) where T : unmanaged {
var start = Memory.Span.Slice(pos, sizeof(T));
#if NET6_0
MemoryMarshal.Write(start, ref value);
pos += sizeof(T);
#else
MemoryMarshal.Write(start, in value);
#endif
pos += sizeof(T);
}

public unsafe void WriteAt<T>(long offset, T value) where T : unmanaged {
Expand Down
2 changes: 1 addition & 1 deletion src/Decompiler/Decompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Import Project="$(ProjectDir)../Drivers/ApiTracking.items "/>
-->
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<AssemblyName>Reko.Decompiler</AssemblyName>
<RootNamespace>Reko</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
Expand Down

0 comments on commit d68b9b0

Please sign in to comment.