Skip to content

Commit 2d6d3e6

Browse files
committed
git_buf: dispose instead of free
libgit2 has updated some function signatures for consistency, including `git_buf_free` which is now `git_buf_dispose`.
1 parent 142eea2 commit 2d6d3e6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

LibGit2Sharp/Core/GitBuf.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal class GitBuf : IDisposable
1212

1313
public void Dispose()
1414
{
15-
Proxy.git_buf_free(this);
15+
Proxy.git_buf_dispose(this);
1616
}
1717
}
1818
}

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ internal static extern unsafe int git_branch_upstream_name(
279279
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(StrictUtf8Marshaler))] string referenceName);
280280

281281
[DllImport(libgit2, CallingConvention = CallingConvention.Cdecl)]
282-
internal static extern void git_buf_free(GitBuf buf);
282+
internal static extern void git_buf_dispose(GitBuf buf);
283283

284284
[DllImport(libgit2, CallingConvention = CallingConvention.Cdecl)]
285285
internal static extern unsafe int git_checkout_tree(

LibGit2Sharp/Core/Proxy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ public static unsafe string git_branch_upstream_name(RepositoryHandle handle, st
286286

287287
#region git_buf_
288288

289-
public static void git_buf_free(GitBuf buf)
289+
public static void git_buf_dispose(GitBuf buf)
290290
{
291-
NativeMethods.git_buf_free(buf);
291+
NativeMethods.git_buf_dispose(buf);
292292
}
293293

294294
#endregion

0 commit comments

Comments
 (0)