diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-19 17:25:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-19 17:25:25 +0200 |
commit | f562e72df726c6191fa305e1c0a113f1cfb87f76 (patch) | |
tree | 038e6b9d3688a74c953f17a6eef509389b469163 /src/vim.h | |
parent | 6cfdb2a3bad5a6049de22dcdd1da0f6666478398 (diff) | |
download | vim-git-f562e72df726c6191fa305e1c0a113f1cfb87f76.tar.gz |
patch 7.4.2071v7.4.2071
Problem: The return value of type() is difficult to use.
Solution: Define v:t_ constants. (Ken Takata)
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -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 |