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:
authorBen Straub <bs@github.com>2014-01-08 22:31:29 +0400
committerBen Straub <bs@github.com>2014-01-10 03:07:37 +0400
commit9165ae30d4cff10681b5b65f094d0d4320426b6e (patch)
tree0060736b5eb2a1d6a50a04f7b926a9beedfd3b59 /LibGit2Sharp/Signature.cs
parentdce1367264ac8c5ba6df22080cac1e22100a8c75 (diff)
Introduce marshaling extension to IntPtr
Diffstat (limited to 'LibGit2Sharp/Signature.cs')
-rw-r--r--LibGit2Sharp/Signature.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/LibGit2Sharp/Signature.cs b/LibGit2Sharp/Signature.cs
index d4a1f374..bc9dc778 100644
--- a/LibGit2Sharp/Signature.cs
+++ b/LibGit2Sharp/Signature.cs
@@ -19,8 +19,7 @@ namespace LibGit2Sharp
internal Signature(IntPtr signaturePtr)
{
- var handle = new GitSignature();
- Marshal.PtrToStructure(signaturePtr, handle);
+ var handle = signaturePtr.MarshalAs<GitSignature>();
name = LaxUtf8Marshaler.FromNative(handle.Name);
email = LaxUtf8Marshaler.FromNative(handle.Email);