diff options
author | ZyX <kp-pav@yandex.ru> | 2015-06-28 08:06:16 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-08 21:59:53 +0300 |
commit | 200e62efebe8e87fc612218b675b74def57519f1 (patch) | |
tree | 6aa90a5522f5ef70a9eb3b6d8edb10a477c171a7 /src/nvim/lib/khash.h | |
parent | 9ab08c82569d57fad29da95dc776ae288300903e (diff) | |
download | rneovim-200e62efebe8e87fc612218b675b74def57519f1.tar.gz rneovim-200e62efebe8e87fc612218b675b74def57519f1.tar.bz2 rneovim-200e62efebe8e87fc612218b675b74def57519f1.zip |
shada: Add support for dumping/restoring bufs changes and win jumps
Diffstat (limited to 'src/nvim/lib/khash.h')
-rw-r--r-- | src/nvim/lib/khash.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/lib/khash.h b/src/nvim/lib/khash.h index 96e7ea6df0..fd4f910dac 100644 --- a/src/nvim/lib/khash.h +++ b/src/nvim/lib/khash.h @@ -577,6 +577,19 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key) code; \ } } +/*! @function + @abstract Iterate over the keys in the hash table + @param h Pointer to the hash table [khash_t(name)*] + @param kvar Variable to which value will be assigned + @param code Block of code to execute + */ +#define kh_foreach_key(h, kvar, code) { khint_t __i; \ + for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \ + if (!kh_exist(h,__i)) continue; \ + (kvar) = kh_key(h,__i); \ + code; \ + } } + /* More conenient interfaces */ /*! @function |