summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-01-22 11:55:28 +0100
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-01-22 11:55:28 +0100
commitd23ce18710caf4bc210ab874790433d041a6b230 (patch)
tree9b5b3c0f261f335027ba300e2bc50b2bef03a06e
parent45f584090818c59ba27ca95b1e930a41c424d6f1 (diff)
downloadlibgit2-d23ce18710caf4bc210ab874790433d041a6b230.tar.gz
odb: export mempack backend
Fixes #4492, #4496.
-rw-r--r--include/git2/sys/mempack.h9
-rw-r--r--src/odb_mempack.c1
2 files changed, 6 insertions, 4 deletions
diff --git a/include/git2/sys/mempack.h b/include/git2/sys/mempack.h
index 96074fb77..490636b44 100644
--- a/include/git2/sys/mempack.h
+++ b/include/git2/sys/mempack.h
@@ -11,6 +11,7 @@
#include "git2/types.h"
#include "git2/oid.h"
#include "git2/odb.h"
+#include "git2/buffer.h"
/**
* @file git2/sys/mempack.h
@@ -38,10 +39,10 @@ GIT_BEGIN_DECL
* Subsequent reads will also be served from the in-memory store
* to ensure consistency, until the memory store is dumped.
*
- * @param out Poiter where to store the ODB backend
+ * @param out Pointer where to store the ODB backend
* @return 0 on success; error code otherwise
*/
-int git_mempack_new(git_odb_backend **out);
+GIT_EXTERN(int) git_mempack_new(git_odb_backend **out);
/**
* Dump all the queued in-memory writes to a packfile.
@@ -64,7 +65,7 @@ int git_mempack_new(git_odb_backend **out);
* @param backend The mempack backend
* @return 0 on success; error code otherwise
*/
-int git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backend);
+GIT_EXTERN(int) git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backend);
/**
* Reset the memory packer by clearing all the queued objects.
@@ -78,7 +79,7 @@ int git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backe
*
* @param backend The mempack backend
*/
-void git_mempack_reset(git_odb_backend *backend);
+GIT_EXTERN(void) git_mempack_reset(git_odb_backend *backend);
GIT_END_DECL
diff --git a/src/odb_mempack.c b/src/odb_mempack.c
index 0c05f0566..a81716ee3 100644
--- a/src/odb_mempack.c
+++ b/src/odb_mempack.c
@@ -9,6 +9,7 @@
#include "git2/object.h"
#include "git2/sys/odb_backend.h"
+#include "git2/sys/mempack.h"
#include "fileops.h"
#include "hash.h"
#include "odb.h"