Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-04-15 11:05:44 +0400
committerVicent Marti <tanoku@gmail.com>2013-04-22 18:51:40 +0400
commit786062639f05e361da977f3f1f6286141fa12fca (patch)
tree5dc63d86657681572376ef2bced9bb2cae8e2213 /src/blob.h
parent917f60c50bce09f789aeb927b45ba3bca5a23877 (diff)
Add callback to git_objects_table
This adds create and free callback to the git_objects_table so that more of the creation and destruction of objects can be table driven instead of using switch statements. This also makes the semantics of certain object creation functions consistent so that we can make better use of function pointers. This also fixes a theoretical error case where an object allocation fails and we end up storing NULL into the cache.
Diffstat (limited to 'src/blob.h')
-rw-r--r--src/blob.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blob.h b/src/blob.h
index 524734b1f..4873505fd 100644
--- a/src/blob.h
+++ b/src/blob.h
@@ -17,8 +17,8 @@ struct git_blob {
git_odb_object *odb_object;
};
-void git_blob__free(git_blob *blob);
-int git_blob__parse(git_blob *blob, git_odb_object *obj);
+void git_blob__free(void *blob);
+int git_blob__from_odb_object(void *blob, git_odb_object *obj);
int git_blob__getbuf(git_buf *buffer, git_blob *blob);
#endif