Commit 0ed67c1cb47f59f0b794379614ac9918138405a0

Ben Straub 2012-11-27T12:33:58

API updates for odb_backend.h

diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index 4df48d7..694803e 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -79,8 +79,8 @@ struct git_odb_backend {
 
 	int (* foreach)(
 			struct git_odb_backend *,
-			int (*cb)(git_oid *oid, void *data),
-			void *data);
+			int (*cb)(git_oid *oid, void *payload),
+			void *payload);
 
 	int (* writepack)(
 			struct git_odb_writepack **,
@@ -101,7 +101,7 @@ enum {
 /** A stream to read/write from a backend */
 struct git_odb_stream {
 	struct git_odb_backend *backend;
-	int mode;
+	unsigned int mode;
 
 	int (*read)(struct git_odb_stream *stream, char *buffer, size_t len);
 	int (*write)(struct git_odb_stream *stream, const char *buffer, size_t len);
@@ -118,12 +118,15 @@ struct git_odb_writepack {
 	void (*free)(struct git_odb_writepack *writepack);
 };
 
-GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **backend_out, const char *objects_dir);
-GIT_EXTERN(int) git_odb_backend_loose(git_odb_backend **backend_out, const char *objects_dir, int compression_level, int do_fsync);
-GIT_EXTERN(int) git_odb_backend_one_pack(git_odb_backend **backend_out, const char *index_file);
-
 GIT_EXTERN(void *) git_odb_backend_malloc(git_odb_backend *backend, size_t len);
 
+/**
+ * Constructors for in-box ODB backends.
+ */
+GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **out, const char *objects_dir);
+GIT_EXTERN(int) git_odb_backend_loose(git_odb_backend **out, const char *objects_dir, int compression_level, int do_fsync);
+GIT_EXTERN(int) git_odb_backend_one_pack(git_odb_backend **out, const char *index_file);
+
 GIT_END_DECL
 
 #endif