summaryrefslogtreecommitdiff
path: root/include/git2/odb_backend.h
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-27 12:33:58 -0800
committerBen Straub <bs@github.com>2012-11-27 13:18:30 -0800
commit0ed67c1cb47f59f0b794379614ac9918138405a0 (patch)
tree206f5251a15ca428ff83f5db48b3ea224ec85093 /include/git2/odb_backend.h
parent2e76b5fc84b7aa3877ef6b8251b7ba15eac1b2de (diff)
downloadlibgit2-0ed67c1cb47f59f0b794379614ac9918138405a0.tar.gz
API updates for odb_backend.h
Diffstat (limited to 'include/git2/odb_backend.h')
-rw-r--r--include/git2/odb_backend.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index 4df48d77e..694803efd 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