aug pointer life-cycle

This commit is contained in:
Wvader 2022-11-05 16:45:48 +00:00
parent 3ca05d9cba
commit 502e13687b
1 changed files with 3 additions and 7 deletions

View File

@ -9,6 +9,9 @@ namespace CodeLiturgy.Augeas
[SuppressUnmanagedCodeSecurity]
public static unsafe partial class AugeasExtern
{
[DllImport(_libName)] public static extern IntPtr init_aug( AugSettings settings, int flags);
[DllImport(_libName)] public static extern void close_aug (IntPtr aug);
[DllImport(_libName)] public static extern void free_str (char* str);
/// <summary>
/// Used by DllImport to load the native library
/// </summary>
@ -20,12 +23,5 @@ namespace CodeLiturgy.Augeas
[DllImport(_libName)] public static extern char* get_tree(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string matchPath);
[DllImport(_libName)] public static extern void defNode( AugSettings settings, [MarshalAs(UnmanagedType.LPStr)] string matchPath);
[DllImport(_libName)] public static extern void load_file(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string filePath);
[DllImport(_libName)] public static extern IntPtr init_aug( AugSettings settings, int flags);
[DllImport(_libName)] public static extern void close_aug (IntPtr aug);
[DllImport(_libName)] public static extern void free_str (char* str);
}
}