8000 Libgit2 dll naming by ben · Pull Request #430 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Libgit2 dll naming #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8000
Prev Previous commit
Next Next commit
Share custom DLL name with [Unsafe]NativeMethods
  • Loading branch information
ben committed May 14, 2013
commit ce98f390586507a05a63971f7e6f1111c0f57ffe
8 changes: 3 additions & 5 deletions LibGit2Sharp/Core/NativeDllName.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

namespace LibGit2Sharp.Core
namespace LibGit2Sharp.Core
{
internal static partial class NativeMethods
internal static class NativeDllName
{
private const string libgit2 = "git2_b641c00";
public const string Name = "git2.b641c00.dll";
}
}

3 changes: 2 additions & 1 deletion LibGit2Sharp/Core/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
// ReSharper disable InconsistentNaming
namespace LibGit2Sharp.Core
{
internal static partial class NativeMethods
internal static class NativeMethods
{
public const uint GIT_PATH_MAX = 4096;
private const string libgit2 = NativeDllName.Name;
private static readonly LibraryLifetimeObject lifetimeObject;
private static int handlesCount;

Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/UnSafeNativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace LibGit2Sharp.Core
{
internal static unsafe class UnSafeNativeMethods
{
private const string libgit2 = "git2";
private const string libgit2 = NativeDllName.Name;

[DllImport(libgit2)]
internal static extern int git_reference_list(out git_strarray array, RepositorySafeHandle repo, GitReferenceType flags);
Expand Down
4 changes: 2 additions & 2 deletions UpdateLibgit2ToSha.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ Push-Location $libgit2Directory
$dllNameClass = @"
namespace LibGit2Sharp.Core
{
internal static partial class NativeMethods
internal static class NativeDllName
{
private const string libgit2 = "git2.$shortsha";
public const string Name = "git2.$shortsha.dll";
}
}
"@
Expand Down
0