aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r--src/nvim/eval.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index 57fee5c5a2..7f6fd76c46 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -1,21 +1,23 @@
#ifndef NVIM_EVAL_H
#define NVIM_EVAL_H
-#include "nvim/profile.h"
#include "nvim/hashtab.h" // For hashtab_T
-#include "nvim/garray.h" // For garray_T
#include "nvim/buffer_defs.h" // For scid_T
#include "nvim/ex_cmds_defs.h" // For exarg_T
+#include "nvim/eval/typval.h"
+#include "nvim/profile.h"
+#include "nvim/garray.h"
#define COPYID_INC 2
#define COPYID_MASK (~0x1)
// All user-defined functions are found in this hashtable.
extern hashtab_T func_hashtab;
+
// From user function to hashitem and back.
EXTERN ufunc_T dumuf;
#define UF2HIKEY(fp) ((fp)->uf_name)
-#define HIKEY2UF(p) ((ufunc_T *)(p - (dumuf.uf_name - (char_u *)&dumuf)))
+#define HIKEY2UF(p) ((ufunc_T *)(p - offsetof(ufunc_T, uf_name)))
#define HI2UF(hi) HIKEY2UF((hi)->hi_key)
/// Defines for Vim variables