diff --git a/CSTNet/CST.cs b/CSTNet/CST.cs index c680eac..1d60f73 100644 --- a/CSTNet/CST.cs +++ b/CSTNet/CST.cs @@ -1,5 +1,8 @@ // This project is licensed under the BSD 3-Clause license. // See the LICENSE file in the project root for more information. +#if NET8_0 +using System.Runtime.InteropServices; +#endif namespace CSTNet; @@ -30,6 +33,16 @@ public class CST return GetEntry(entries, key); } +#if NET8_0 + [UnmanagedCallersOnly(EntryPoint = "parse")] + public static IntPtr Parse(IntPtr content, IntPtr key) + { + // => Parse(Marshal.PtrToStringAnsi(content), Marshal.PtrToStringAnsi(key)); + var entries = NormalizeEntries(Marshal.PtrToStringAnsi(content)); + return Marshal.StringToHGlobalAnsi(GetEntry(entries, Marshal.PtrToStringAnsi(key))); + } +#endif + /// /// Replaces the document's line endings with the native system line endings. /// diff --git a/CSTNet/CSTNet.csproj b/CSTNet/CSTNet.csproj index 925fd35..f12b66e 100644 --- a/CSTNet/CSTNet.csproj +++ b/CSTNet/CSTNet.csproj @@ -2,7 +2,7 @@ net6.0;netstandard2.1;net8.0 - 2.0.103 + 2.0.200-beta1 enable latest enable @@ -17,4 +17,9 @@ BSD-3-Clause + + + true + + \ No newline at end of file diff --git a/doc/changelog.md b/doc/changelog.md index f48c87a..e618f41 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -1,5 +1,11 @@ # Change Log +## 2.0.200 + +- Preliminary support for .NET 8 +- Native compatibility + - Parser function can now be consumed from non-.NET programming languages + ## 2.0.102 - Properly commented and documented the rest of the code. @@ -14,12 +20,6 @@ Based on FreeSO's API, the ``UIText`` class allows for traversing in ``/