diff src/vim.h @ 9587:05a56bbe34a1 v7.4.2071

commit https://github.com/vim/vim/commit/f562e72df726c6191fa305e1c0a113f1cfb87f76 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jul 19 17:25:25 2016 +0200 patch 7.4.2071 Problem: The return value of type() is difficult to use. Solution: Define v:t_ constants. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Jul 2016 17:30:06 +0200
parents 1fdd97be3967
children 0190d5de215f
line wrap: on
line diff
--- a/src/vim.h
+++ b/src/vim.h
@@ -1968,7 +1968,17 @@ typedef int sock_T;
 #define VV_NONE		68
 #define VV_VIM_DID_ENTER 69
 #define VV_TESTING	70
-#define VV_LEN		71	/* number of v: vars */
+#define VV_TYPE_NUMBER	71
+#define VV_TYPE_STRING	72
+#define VV_TYPE_FUNC	73
+#define VV_TYPE_LIST	74
+#define VV_TYPE_DICT	75
+#define VV_TYPE_FLOAT	76
+#define VV_TYPE_BOOL	77
+#define VV_TYPE_NONE	78
+#define VV_TYPE_JOB	79
+#define VV_TYPE_CHANNEL	80
+#define VV_LEN		81	/* number of v: vars */
 
 /* used for v_number in VAR_SPECIAL */
 #define VVAL_FALSE	0L
@@ -1976,6 +1986,18 @@ typedef int sock_T;
 #define VVAL_NONE	2L
 #define VVAL_NULL	3L
 
+/* Type values for type(). */
+#define VAR_TYPE_NUMBER	    0
+#define VAR_TYPE_STRING	    1
+#define VAR_TYPE_FUNC	    2
+#define VAR_TYPE_LIST	    3
+#define VAR_TYPE_DICT	    4
+#define VAR_TYPE_FLOAT	    5
+#define VAR_TYPE_BOOL	    6
+#define VAR_TYPE_NONE	    7
+#define VAR_TYPE_JOB	    8
+#define VAR_TYPE_CHANNEL    9
+
 #ifdef FEAT_CLIPBOARD
 
 /* VIM_ATOM_NAME is the older Vim-specific selection type for X11.  Still