diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-11-23 19:27:09 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-11-28 15:22:27 +0100 |
| commit | f2f5ec844d96fe0007a47e4df00499ab5598b41f (patch) | |
| tree | 2d9bee0c39dbd05ca1a7db13fd3d2583cd823406 /src/offmap.h | |
| parent | 852bc9f4967d3bd70a284794ff486253e37c6980 (diff) | |
| download | libgit2-f2f5ec844d96fe0007a47e4df00499ab5598b41f.tar.gz | |
khash: move khash include into implementation files
The current map implementations directly include the "khash.h" headers
into their own headers to make available a set of static functions,
defines et cetera. Besides leaking the complete khash namespace into
files wherever khashes are used, this also triggers Clang's
-Wunused-function warnings when some of the static functions are not
being used at all.
Fix the issue by moving the includes into the respective map
implementation files. Add forward declares for all the map types to make
them known.
Diffstat (limited to 'src/offmap.h')
| -rw-r--r-- | src/offmap.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/offmap.h b/src/offmap.h index 82ebfb780..c68809389 100644 --- a/src/offmap.h +++ b/src/offmap.h @@ -11,15 +11,7 @@ #include "git2/types.h" -#define kmalloc git__malloc -#define kcalloc git__calloc -#define krealloc git__realloc -#define kreallocarray git__reallocarray -#define kfree git__free -#include "khash.h" - -__KHASH_TYPE(off, git_off_t, void *) -typedef khash_t(off) git_offmap; +typedef struct kh_off_s git_offmap; git_offmap *git_offmap_alloc(void); void git_offmap_free(git_offmap *map); |
