checkpoint

This commit is contained in:
2020-04-30 13:33:30 -04:00
parent 19a9fc06ba
commit 9bc522180d
21 changed files with 337 additions and 276 deletions

View File

@@ -1,8 +1,25 @@
using System;
using System.Runtime.InteropServices;
namespace Foodsoft.Alpm
{
public struct Backup
{
private string _name;
private string _hash;
public string Name { get; }
public string Hash { get; }
[StructLayout(LayoutKind.Sequential)]
private readonly unsafe struct NativeBackup
{
internal readonly sbyte* name;
internal readonly sbyte* hash;
}
internal unsafe Backup(IntPtr ptr)
{
var native = (NativeBackup*) ptr;
Name = new string(native->name);
Hash = new string(native->hash);
}
}
}