diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-11-23 18:38:18 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-11-28 15:22:27 +0100 |
| commit | 382b668bf2019eb8fb7c0afc4d6e3132dca9510e (patch) | |
| tree | bbf4314f4ec75a09f87845814e047e3394f03fae /src/offmap.h | |
| parent | ae765d0013e767e0c3824eea439a606b81f3083a (diff) | |
| download | libgit2-382b668bf2019eb8fb7c0afc4d6e3132dca9510e.tar.gz | |
khash: implement begin/end via functions instead of macros
Right now, the `git_*map_begin()` and `git_*map_end()` helpers are
implemented via macros which simply redirect to `kh_begin` and `kh_end`.
As these macros refer to members of the map structures, they make it
impossible to move the khash include into the implementation files.
Implement these helpers as real functions instead to further decouple
the headers from implementations.
Diffstat (limited to 'src/offmap.h')
| -rw-r--r-- | src/offmap.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/offmap.h b/src/offmap.h index 0b0896b8f..bf2b13de4 100644 --- a/src/offmap.h +++ b/src/offmap.h @@ -40,6 +40,9 @@ int git_offmap_put(git_offmap *map, const git_off_t key, int *err); void git_offmap_insert(git_offmap *map, const git_off_t key, void *value, int *rval); void git_offmap_delete(git_offmap *map, const git_off_t key); +size_t git_offmap_begin(git_offmap *map); +size_t git_offmap_end(git_offmap *map); + #define git_offmap_foreach kh_foreach #define git_offmap_foreach_value kh_foreach_value |
