diff src/globals.h @ 9556:afaff1d283d3 v7.4.2055

commit https://github.com/vim/vim/commit/cd52459c387785796713826c63174cdeed295dd4 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 17 14:57:05 2016 +0200 patch 7.4.2055 Problem: eval.c is too big. Solution: Move Dictionary functions to dict.c.
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jul 2016 15:15:05 +0200
parents b2aada04d84e
children 1e68dfd7931b
line wrap: on
line diff
--- a/src/globals.h
+++ b/src/globals.h
@@ -1534,6 +1534,7 @@ EXTERN char_u e_readonly[]	INIT(= N_("E4
 EXTERN char_u e_readonlyvar[]	INIT(= N_("E46: Cannot change read-only variable \"%s\""));
 EXTERN char_u e_readonlysbx[]	INIT(= N_("E794: Cannot set variable in the sandbox: \"%s\""));
 EXTERN char_u e_emptykey[]	INIT(= N_("E713: Cannot use empty key for Dictionary"));
+EXTERN char_u e_dictreq[]	INIT(= N_("E715: Dictionary required"));
 #endif
 #ifdef FEAT_QUICKFIX
 EXTERN char_u e_readerrf[]	INIT(= N_("E47: Error while reading errorfile"));
@@ -1644,6 +1645,21 @@ EXTERN int  did_add_timer INIT(= FALSE);
 
 #ifdef FEAT_EVAL
 EXTERN time_T time_for_testing INIT(= 0);
+
+/*
+ * In a hashtab item "hi_key" points to "di_key" in a dictitem.
+ * This avoids adding a pointer to the hashtab item.
+ * DI2HIKEY() converts a dictitem pointer to a hashitem key pointer.
+ * HIKEY2DI() converts a hashitem key pointer to a dictitem pointer.
+ * HI2DI() converts a hashitem pointer to a dictitem pointer.
+ */
+EXTERN dictitem_T dumdi;
+# define DI2HIKEY(di) ((di)->di_key)
+# define HIKEY2DI(p)  ((dictitem_T *)(p - (dumdi.di_key - (char_u *)&dumdi)))
+# define HI2DI(hi)     HIKEY2DI((hi)->hi_key)
+
+/* Abort conversion to string after a recursion error. */
+EXTERN int  did_echo_string_emsg INIT(= FALSE);
 #endif
 
 /*