aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hashtab.h
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-01-07 15:26:34 +0300
committerZyX <kp-pav@yandex.ru>2017-01-07 15:54:55 +0300
commit728367a196c8396c8b186f1dbe2cf878a7fec038 (patch)
tree782ef7bf53e47e2cf7b6e7efed868d3bace32572 /src/nvim/hashtab.h
parenta970c1a95785cce9176274ffd4b783c79372afed (diff)
downloadrneovim-728367a196c8396c8b186f1dbe2cf878a7fec038.tar.gz
rneovim-728367a196c8396c8b186f1dbe2cf878a7fec038.tar.bz2
rneovim-728367a196c8396c8b186f1dbe2cf878a7fec038.zip
unittest: Add dict_items function
Diffstat (limited to 'src/nvim/hashtab.h')
-rw-r--r--src/nvim/hashtab.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/hashtab.h b/src/nvim/hashtab.h
index 7233d8c47c..0da2b13f2e 100644
--- a/src/nvim/hashtab.h
+++ b/src/nvim/hashtab.h
@@ -5,14 +5,19 @@
#include "nvim/types.h"
+/// Magic number used for hashitem "hi_key" value indicating a deleted item
+///
+/// Only the address is used.
+extern char hash_removed;
+
/// Type for hash number (hash calculation result).
typedef size_t hash_T;
/// The address of "hash_removed" is used as a magic number
/// for hi_key to indicate a removed item.
-#define HI_KEY_REMOVED &hash_removed
+#define HI_KEY_REMOVED ((char_u *)&hash_removed)
#define HASHITEM_EMPTY(hi) ((hi)->hi_key == NULL \
- || (hi)->hi_key == &hash_removed)
+ || (hi)->hi_key == (char_u *)&hash_removed)
/// A hastable item.
///