src/khash.h


Log

Author Commit Date CI Message
Patrick Steinhardt f347a441 2018-06-25T11:55:13 treewide: avoid use of `inline` attribute ISO C90 does not specify the `inline` attribute, and as such we cannot use it in our code. While we already use `__inline` when building in Microsoft Visual Studio, we should also be using the `__inline__` attribute from GCC/Clang. Otherwise, if we're using neither MSVC nor GCC/Clang, we should simply avoid using `inline` at all and just define functions as static. This commit adjusts our own `GIT_INLINE` macro as well as the inline macros specified by khash and xdiff. This allows us to enable strict C90 mode in a later commit.
Edward Thomson 9c033102 2015-06-30T13:41:01 khash: add eol so picky compilers stop warning
Edward Thomson 650e45f6 2015-02-11T17:51:17 Update `khash.h` to pull request 42 https://github.com/attractivechaos/klib/pull/42/files introduces `kreallocarray`. Hook that up as our `git__reallocarray`.
Edward Thomson 1ad48c8a 2015-02-11T17:36:57 khash: update to klib f28c067
Russell Belfer 72ee0787 2012-07-12T11:48:12 Isolate khash inlines from global namespace khash.h was globally #define'ing "inline" which messes with other files. Let's keep it as "kh_inline".
Russell Belfer 821f6bc7 2012-04-26T13:04:54 Fix Win32 warnings
Russell Belfer 01fed0a8 2012-04-25T10:36:01 Convert hashtable usage over to khash This updates khash.h with some extra features (like error checking on allocations, ability to use wrapped malloc, foreach calls, etc), creates two high-level wrappers around khash: `git_khash_str` and `git_khash_oid` for string-to-void-ptr and oid-to-void-ptr tables, then converts all of the old usage of `git_hashtable` over to use these new hashtables. For `git_khash_str`, I've tried to create a set of macros that yield an API not too unlike the old `git_hashtable` API. Since the oid hashtable is only used in one file, I haven't bother to set up all those macros and just use the khash APIs directly for now.
Russell Belfer ada488bf 2012-04-24T11:02:40 Import khash.h from attractivechaos/klib