diff options
author | Ben Straub <bs@github.com> | 2014-01-08 22:31:29 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2014-01-10 03:07:37 +0400 |
commit | 9165ae30d4cff10681b5b65f094d0d4320426b6e (patch) | |
tree | 0060736b5eb2a1d6a50a04f7b926a9beedfd3b59 /LibGit2Sharp/ObjectDatabase.cs | |
parent | dce1367264ac8c5ba6df22080cac1e22100a8c75 (diff) |
Introduce marshaling extension to IntPtr
Diffstat (limited to 'LibGit2Sharp/ObjectDatabase.cs')
-rw-r--r-- | LibGit2Sharp/ObjectDatabase.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LibGit2Sharp/ObjectDatabase.cs b/LibGit2Sharp/ObjectDatabase.cs index 1fe0a890..bb43e640 100644 --- a/LibGit2Sharp/ObjectDatabase.cs +++ b/LibGit2Sharp/ObjectDatabase.cs @@ -43,7 +43,7 @@ namespace LibGit2Sharp public virtual IEnumerator<GitObject> GetEnumerator() { ICollection<GitOid> oids = Proxy.git_odb_foreach(handle, - ptr => (GitOid) Marshal.PtrToStructure(ptr, typeof (GitOid))); + ptr => ptr.MarshalAs<GitOid>()); return oids .Select(gitOid => repo.Lookup<GitObject>(new ObjectId(gitOid))) |