summaryrefslogtreecommitdiff
path: root/src/khash.h
Commit message (Collapse)AuthorAgeFilesLines
* treewide: avoid use of `inline` attributePatrick Steinhardt2018-07-131-1/+3
| | | | | | | | | | | | | 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.
* khash: add eol so picky compilers stop warningEdward Thomson2015-07-101-1/+1
|
* Update `khash.h` to pull request 42Edward Thomson2015-02-121-5/+8
| | | | | https://github.com/attractivechaos/klib/pull/42/files introduces `kreallocarray`. Hook that up as our `git__reallocarray`.
* khash: update to klib f28c067Edward Thomson2015-02-121-24/+33
|
* Isolate khash inlines from global namespaceRussell Belfer2012-07-121-4/+6
| | | | | khash.h was globally #define'ing "inline" which messes with other files. Let's keep it as "kh_inline".
* Fix Win32 warningsRussell Belfer2012-04-261-8/+8
|
* Convert hashtable usage over to khashRussell Belfer2012-04-251-20/+80
| | | | | | | | | | | | | | | 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.
* Import khash.h from attractivechaos/klibRussell Belfer2012-04-251-0/+548