diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-03-28 19:34:57 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-03-28 22:02:17 +0400 |
commit | b94a1113dc5e7c6377e7300150784f7fc16f3dac (patch) | |
tree | 9cdb572f5b66c94543622af708d22b4788b02d3c /LibGit2Sharp/Index.cs | |
parent | 61976902d1f22eb5056e7380a28949426a9990bc (diff) |
Replace usage of IntPtr holding references to index entries with IndexEntrySafeHandle
Diffstat (limited to 'LibGit2Sharp/Index.cs')
-rw-r--r-- | LibGit2Sharp/Index.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs index 15dbfba6..e380031b 100644 --- a/LibGit2Sharp/Index.cs +++ b/LibGit2Sharp/Index.cs @@ -5,6 +5,7 @@ using System.Globalization; using System.IO; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Compat; +using LibGit2Sharp.Core.Handles; namespace LibGit2Sharp { @@ -67,8 +68,8 @@ namespace LibGit2Sharp { get { - IntPtr entryPtr = NativeMethods.git_index_get(handle, index); - return IndexEntry.CreateFromPtr(repo, entryPtr); + IndexEntrySafeHandle entryHandle = NativeMethods.git_index_get(handle, index); + return IndexEntry.CreateFromPtr(repo, entryHandle); } } |