summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-08-17 01:41:08 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-08-17 01:41:08 +0200
commitfe0c6d4e712fa1bb072b8a847783bad47f3e91eb (patch)
treea6d2aa207b418038028ccd5d806c74dc65b34646 /include/git2/sys
parentd4e6cf0cd05540b373bfcb8908e4bc8f8f72c73c (diff)
downloadlibgit2-fe0c6d4e712fa1bb072b8a847783bad47f3e91eb.tar.gz
odb: make it clearer that the id is calculated in the frontend
The frontend is in charge of calculating the id of the objects. Thus the backends should treat it as a read-only value. The positioning in the function signature made it seem as though it was an output parameter. Make the id const and move it from the front to behind the subject (backend or stream).
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/odb_backend.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/git2/sys/odb_backend.h b/include/git2/sys/odb_backend.h
index 3cd2734c0..2d06613d2 100644
--- a/include/git2/sys/odb_backend.h
+++ b/include/git2/sys/odb_backend.h
@@ -48,12 +48,8 @@ struct git_odb_backend {
int (* read_header)(
size_t *, git_otype *, git_odb_backend *, const git_oid *);
- /* The writer may assume that the object
- * has already been hashed and is passed
- * in the first parameter.
- */
int (* write)(
- git_oid *, git_odb_backend *, const void *, size_t, git_otype);
+ git_odb_backend *, const git_oid *, const void *, size_t, git_otype);
int (* writestream)(
git_odb_stream **, git_odb_backend *, size_t, git_otype);