aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hashtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/hashtab.c')
-rw-r--r--src/nvim/hashtab.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/hashtab.c b/src/nvim/hashtab.c
index fa4077f22f..376f33e23e 100644
--- a/src/nvim/hashtab.c
+++ b/src/nvim/hashtab.c
@@ -36,6 +36,8 @@
# include "hashtab.c.generated.h"
#endif
+char hash_removed;
+
/// Initialize an empty hash table.
void hash_init(hashtab_T *ht)
{
@@ -380,3 +382,13 @@ hash_T hash_hash(char_u *key)
return hash;
}
+
+/// Function to get HI_KEY_REMOVED value
+///
+/// Used for testing because luajit ffi does not allow getting addresses of
+/// globals.
+const char_u *_hash_key_removed(void)
+ FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
+{
+ return HI_KEY_REMOVED;
+}