diff options
| author | Russell Belfer <rb@github.com> | 2012-11-27 15:00:49 -0800 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-11-27 15:00:49 -0800 |
| commit | c3fb7d04edecb68f0307dfaa48a311f0f72db90e (patch) | |
| tree | 81e5424275d91ca002ef17aa5b1bc2c3fba2d07c /src | |
| parent | f984d97b2208b48a6aec8877d0af357cca0c637d (diff) | |
| download | libgit2-c3fb7d04edecb68f0307dfaa48a311f0f72db90e.tar.gz | |
Make git_odb_foreach_cb take const param
This makes the first OID param of the ODB callback a const pointer
and also propogates that change all the way to the backends.
Diffstat (limited to 'src')
| -rw-r--r-- | src/odb_loose.c | 4 | ||||
| -rw-r--r-- | src/odb_pack.c | 2 | ||||
| -rw-r--r-- | src/pack.c | 2 | ||||
| -rw-r--r-- | src/pack.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c index 41121ae10..e2f1aec32 100644 --- a/src/odb_loose.c +++ b/src/odb_loose.c @@ -678,7 +678,7 @@ static int loose_backend__exists(git_odb_backend *backend, const git_oid *oid) struct foreach_state { size_t dir_len; - int (*cb)(git_oid *oid, void *data); + git_odb_foreach_cb cb; void *data; int cb_error; }; @@ -734,7 +734,7 @@ static int foreach_cb(void *_state, git_buf *path) return git_path_direach(path, foreach_object_dir_cb, state); } -static int loose_backend__foreach(git_odb_backend *_backend, int (*cb)(git_oid *oid, void *data), void *data) +static int loose_backend__foreach(git_odb_backend *_backend, git_odb_foreach_cb cb, void *data) { char *objects_dir; int error; diff --git a/src/odb_pack.c b/src/odb_pack.c index 9f7a6ee1f..35bf1580d 100644 --- a/src/odb_pack.c +++ b/src/odb_pack.c @@ -458,7 +458,7 @@ static int pack_backend__exists(git_odb_backend *backend, const git_oid *oid) return pack_entry_find(&e, (struct pack_backend *)backend, oid) == 0; } -static int pack_backend__foreach(git_odb_backend *_backend, int (*cb)(git_oid *oid, void *data), void *data) +static int pack_backend__foreach(git_odb_backend *_backend, git_odb_foreach_cb cb, void *data) { int error; struct git_pack_file *p; diff --git a/src/pack.c b/src/pack.c index a2a2fbcd1..6cb46d37b 100644 --- a/src/pack.c +++ b/src/pack.c @@ -698,7 +698,7 @@ static int git__memcmp4(const void *a, const void *b) { int git_pack_foreach_entry( struct git_pack_file *p, - int (*cb)(git_oid *oid, void *data), + git_odb_foreach_cb cb, void *data) { const unsigned char *index = p->index_map.data, *current; diff --git a/src/pack.h b/src/pack.h index af87b7cd5..9fb26b6a9 100644 --- a/src/pack.h +++ b/src/pack.h @@ -105,7 +105,7 @@ int git_pack_entry_find( size_t len); int git_pack_foreach_entry( struct git_pack_file *p, - int (*cb)(git_oid *oid, void *data), + git_odb_foreach_cb cb, void *data); #endif |
