Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-03-28 19:34:57 +0400
committernulltoken <emeric.fermas@gmail.com>2012-03-28 22:02:17 +0400
commitb94a1113dc5e7c6377e7300150784f7fc16f3dac (patch)
tree9cdb572f5b66c94543622af708d22b4788b02d3c /LibGit2Sharp/Index.cs
parent61976902d1f22eb5056e7380a28949426a9990bc (diff)
Replace usage of IntPtr holding references to index entries with IndexEntrySafeHandle
Diffstat (limited to 'LibGit2Sharp/Index.cs')
-rw-r--r--LibGit2Sharp/Index.cs5
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);
}
}