summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-14 15:48:38 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-14 15:48:38 +0200
commit660a10ad41c14363326f83451c3c425201923119 (patch)
tree98da3e8bf0b6653517fe6142ba9159109aa3d75f /src/structs.h
parent1850b14c0d338eb27fb32d0d6e0bfb6944c75c5a (diff)
downloadvim-git-660a10ad41c14363326f83451c3c425201923119.tar.gz
patch 8.1.1689: profiling code is spread outv8.1.1689
Problem: Profiling code is spread out. Solution: Move more profiling code to profiler.c. (Yegappan Lakshmanan, closes #4668)
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h
index 0ab20354d..926015185 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1518,6 +1518,11 @@ struct funccal_entry {
funccal_entry_T *next;
};
+/* From user function to hashitem and back. */
+#define UF2HIKEY(fp) ((fp)->uf_name)
+#define HIKEY2UF(p) ((ufunc_T *)((p) - offsetof(ufunc_T, uf_name)))
+#define HI2UF(hi) HIKEY2UF((hi)->hi_key)
+
/* Growarray to store info about already sourced scripts.
* For Unix also store the dev/ino, so that we don't have to stat() each
* script when going through the list. */