odb: export mempack backend Fixes #4492, #4496.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
diff --git a/include/git2/sys/mempack.h b/include/git2/sys/mempack.h
index 96074fb..490636b 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 0c05f05..a81716e 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"