summaryrefslogtreecommitdiffstats
path: root/src/dict.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-11 15:21:05 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-11 15:21:05 +0100
commitf49cc60aa802862c595ff619dccc11271633a94b (patch)
treee8f01a0c236f2910f117c858f7236b8919e33b93 /src/dict.c
parent8617b401599451187fa0c0561a84944978536a90 (diff)
patch 8.1.0519: cannot save and restore the tag stackv8.1.0519
Problem: Cannot save and restore the tag stack. Solution: Add gettagstack() and settagstack(). (Yegappan Lakshmanan, closes #3604)
Diffstat (limited to 'src/dict.c')
-rw-r--r--src/dict.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dict.c b/src/dict.c
index c359e6f0f6..da3e763e2f 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -47,6 +47,19 @@ dict_alloc(void)
return d;
}
+/*
+ * dict_alloc() with an ID for alloc_fail().
+ */
+ dict_T *
+dict_alloc_id(alloc_id_T id UNUSED)
+{
+#ifdef FEAT_EVAL
+ if (alloc_fail_id == id && alloc_does_fail((long_u)sizeof(list_T)))
+ return NULL;
+#endif
+ return (dict_alloc());
+}
+
dict_T *
dict_alloc_lock(int lock)
{