8000 WIP · libgit2/libgit2sharp@2011a43 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2011a43

Browse files
committed
WIP
1 parent 140608a commit 2011a43

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

LibGit2Sharp/Core/GitBuf.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
using System;
2-
using System.Runtime.InteropServices;
32

43
namespace LibGit2Sharp.Core.Handles
54
{
6-
[StructLayout(LayoutKind.Sequential)]
7-
internal class GitBuf : IDisposable
5+
internal struct GitBuf : IDisposable
86
{
97
public IntPtr ptr;
108
public UIntPtr asize;

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// Restrict the set of directories where the native library is loaded from to safe directories.
1212
[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory | DllImportSearchPath.ApplicationDirectory | DllImportSearchPath.SafeDirectories)]
13+
[assembly: DisableRuntimeMarshalling]
1314

1415
namespace LibGit2Sharp.Core
1516
{
@@ -1095,14 +1096,17 @@ internal delegate int git_remote_rename_problem_cb(
10951096

10961097
[LibraryImport(libgit2)]
10971098
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
1099+
[return: MarshalAs(UnmanagedType.Bool)]
10981100
internal static partial bool git_refspec_force(IntPtr refSpec);
10991101

11001102
[LibraryImport(libgit2, StringMarshalling = StringMarshalling.Utf8)]
11011103
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
1104+
[return: MarshalAs(UnmanagedType.Bool)]
11021105
internal static partial bool git_refspec_src_matches(IntPtr refspec, string reference);
11031106

11041107
[LibraryImport(libgit2, StringMarshalling = StringMarshalling.Utf8)]
11051108
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
1109+
[return: MarshalAs(UnmanagedType.Bool)]
11061110
internal static partial bool git_refspec_dst_matches(IntPtr refspec, string reference);
11071111

11081112
[LibraryImport(libgit2)]

0 commit comments

Comments
 (0)
0