diff src/list.c @ 15016:c338c91086b9 v8.1.0519

patch 8.1.0519: cannot save and restore the tag stack commit https://github.com/vim/vim/commit/f49cc60aa802862c595ff619dccc11271633a94b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 11 15:21:05 2018 +0100 patch 8.1.0519: cannot save and restore the tag stack Problem: Cannot save and restore the tag stack. Solution: Add gettagstack() and settagstack(). (Yegappan Lakshmanan, closes #3604)
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Nov 2018 15:30:07 +0100
parents 46f14852a919
children 3a99b2e6d136
line wrap: on
line diff
--- a/src/list.c
+++ b/src/list.c
@@ -86,6 +86,19 @@ list_alloc(void)
 }
 
 /*
+ * list_alloc() with an ID for alloc_fail().
+ */
+    list_T *
+list_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 (list_alloc());
+}
+
+/*
  * Allocate an empty list for a return value, with reference count set.
  * Returns OK or FAIL.
  */