comparison src/eval.c @ 4323:f1eab4f77a6f v7.3.911

updated for version 7.3.911 Problem: Python: Access to Vim variables is not so easy. Solution: Define vim.vars and vim.vvars. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Apr 2013 14:07:45 +0200
parents bdab73bf24a8
children 7eaccdaa5304
comparison
equal deleted inserted replaced
4322:918eada6eda5 4323:f1eab4f77a6f
111 static char *e_dictrange = N_("E719: Cannot use [:] with a Dictionary"); 111 static char *e_dictrange = N_("E719: Cannot use [:] with a Dictionary");
112 static char *e_letwrong = N_("E734: Wrong variable type for %s="); 112 static char *e_letwrong = N_("E734: Wrong variable type for %s=");
113 static char *e_nofunc = N_("E130: Unknown function: %s"); 113 static char *e_nofunc = N_("E130: Unknown function: %s");
114 static char *e_illvar = N_("E461: Illegal variable name: %s"); 114 static char *e_illvar = N_("E461: Illegal variable name: %s");
115 115
116 /* 116 static dictitem_T globvars_var; /* variable used for g: */
117 * All user-defined global variables are stored in dictionary "globvardict".
118 * "globvars_var" is the variable that is used for "g:".
119 */
120 static dict_T globvardict;
121 static dictitem_T globvars_var;
122 #define globvarht globvardict.dv_hashtab 117 #define globvarht globvardict.dv_hashtab
123 118
124 /* 119 /*
125 * Old Vim variables such as "v:version" are also available without the "v:". 120 * Old Vim variables such as "v:version" are also available without the "v:".
126 * Also in functions. We need a special hashtable for them. 121 * Also in functions. We need a special hashtable for them.
368 #define vv_float vv_di.di_tv.vval.v_float 363 #define vv_float vv_di.di_tv.vval.v_float
369 #define vv_str vv_di.di_tv.vval.v_string 364 #define vv_str vv_di.di_tv.vval.v_string
370 #define vv_list vv_di.di_tv.vval.v_list 365 #define vv_list vv_di.di_tv.vval.v_list
371 #define vv_tv vv_di.di_tv 366 #define vv_tv vv_di.di_tv
372 367
373 /* 368 static dictitem_T vimvars_var; /* variable used for v: */
374 * The v: variables are stored in dictionary "vimvardict".
375 * "vimvars_var" is the variable that is used for the "l:" scope.
376 */
377 static dict_T vimvardict;
378 static dictitem_T vimvars_var;
379 #define vimvarht vimvardict.dv_hashtab 369 #define vimvarht vimvardict.dv_hashtab
380 370
381 static void prepare_vimvar __ARGS((int idx, typval_T *save_tv)); 371 static void prepare_vimvar __ARGS((int idx, typval_T *save_tv));
382 static void restore_vimvar __ARGS((int idx, typval_T *save_tv)); 372 static void restore_vimvar __ARGS((int idx, typval_T *save_tv));
383 static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars)); 373 static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));