|
|
8b9a1c |
To: vim_dev@googlegroups.com
|
|
|
8b9a1c |
Subject: Patch 7.4.154
|
|
|
8b9a1c |
Fcc: outbox
|
|
|
8b9a1c |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
8b9a1c |
Mime-Version: 1.0
|
|
|
8b9a1c |
Content-Type: text/plain; charset=UTF-8
|
|
|
8b9a1c |
Content-Transfer-Encoding: 8bit
|
|
|
8b9a1c |
------------
|
|
|
8b9a1c |
|
|
|
8b9a1c |
Patch 7.4.154 (after 7.4.149)
|
|
|
8b9a1c |
Problem: Still a problem with auto-loading.
|
|
|
8b9a1c |
Solution: Pass no_autoload to deref_func_name(). (Yukihiro Nakadaira)
|
|
|
8b9a1c |
Files: src/eval.c
|
|
|
8b9a1c |
|
|
|
8b9a1c |
|
|
|
8b9a1c |
*** ../vim-7.4.153/src/eval.c 2014-01-14 16:36:40.000000000 +0100
|
|
|
8b9a1c |
--- src/eval.c 2014-01-14 19:40:36.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 447,453 ****
|
|
|
8b9a1c |
#endif
|
|
|
8b9a1c |
static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
|
|
|
8b9a1c |
static int find_internal_func __ARGS((char_u *name));
|
|
|
8b9a1c |
! static char_u *deref_func_name __ARGS((char_u *name, int *lenp));
|
|
|
8b9a1c |
static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
|
|
|
8b9a1c |
static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
|
|
|
8b9a1c |
static void emsg_funcname __ARGS((char *ermsg, char_u *name));
|
|
|
8b9a1c |
--- 447,453 ----
|
|
|
8b9a1c |
#endif
|
|
|
8b9a1c |
static int get_env_tv __ARGS((char_u **arg, typval_T *rettv, int evaluate));
|
|
|
8b9a1c |
static int find_internal_func __ARGS((char_u *name));
|
|
|
8b9a1c |
! static char_u *deref_func_name __ARGS((char_u *name, int *lenp, int no_autoload));
|
|
|
8b9a1c |
static int get_func_tv __ARGS((char_u *name, int len, typval_T *rettv, char_u **arg, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
|
|
|
8b9a1c |
static int call_func __ARGS((char_u *funcname, int len, typval_T *rettv, int argcount, typval_T *argvars, linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict));
|
|
|
8b9a1c |
static void emsg_funcname __ARGS((char *ermsg, char_u *name));
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 3432,3438 ****
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/* If it is the name of a variable of type VAR_FUNC use its contents. */
|
|
|
8b9a1c |
len = (int)STRLEN(tofree);
|
|
|
8b9a1c |
! name = deref_func_name(tofree, &len;;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/* Skip white space to allow ":call func ()". Not good, but required for
|
|
|
8b9a1c |
* backward compatibility. */
|
|
|
8b9a1c |
--- 3432,3438 ----
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/* If it is the name of a variable of type VAR_FUNC use its contents. */
|
|
|
8b9a1c |
len = (int)STRLEN(tofree);
|
|
|
8b9a1c |
! name = deref_func_name(tofree, &len, FALSE);
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/* Skip white space to allow ":call func ()". Not good, but required for
|
|
|
8b9a1c |
* backward compatibility. */
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 5159,5165 ****
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
/* If "s" is the name of a variable of type VAR_FUNC
|
|
|
8b9a1c |
* use its contents. */
|
|
|
8b9a1c |
! s = deref_func_name(s, &len;;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/* Invoke the function. */
|
|
|
8b9a1c |
ret = get_func_tv(s, len, rettv, arg,
|
|
|
8b9a1c |
--- 5159,5165 ----
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
/* If "s" is the name of a variable of type VAR_FUNC
|
|
|
8b9a1c |
* use its contents. */
|
|
|
8b9a1c |
! s = deref_func_name(s, &len, FALSE);
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/* Invoke the function. */
|
|
|
8b9a1c |
ret = get_func_tv(s, len, rettv, arg,
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 8291,8306 ****
|
|
|
8b9a1c |
* name it contains, otherwise return "name".
|
|
|
8b9a1c |
*/
|
|
|
8b9a1c |
static char_u *
|
|
|
8b9a1c |
! deref_func_name(name, lenp)
|
|
|
8b9a1c |
char_u *name;
|
|
|
8b9a1c |
int *lenp;
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
dictitem_T *v;
|
|
|
8b9a1c |
int cc;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
cc = name[*lenp];
|
|
|
8b9a1c |
name[*lenp] = NUL;
|
|
|
8b9a1c |
! v = find_var(name, NULL, FALSE);
|
|
|
8b9a1c |
name[*lenp] = cc;
|
|
|
8b9a1c |
if (v != NULL && v->di_tv.v_type == VAR_FUNC)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
--- 8291,8307 ----
|
|
|
8b9a1c |
* name it contains, otherwise return "name".
|
|
|
8b9a1c |
*/
|
|
|
8b9a1c |
static char_u *
|
|
|
8b9a1c |
! deref_func_name(name, lenp, no_autoload)
|
|
|
8b9a1c |
char_u *name;
|
|
|
8b9a1c |
int *lenp;
|
|
|
8b9a1c |
+ int no_autoload;
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
dictitem_T *v;
|
|
|
8b9a1c |
int cc;
|
|
|
8b9a1c |
|
|
|
8b9a1c |
cc = name[*lenp];
|
|
|
8b9a1c |
name[*lenp] = NUL;
|
|
|
8b9a1c |
! v = find_var(name, NULL, no_autoload);
|
|
|
8b9a1c |
name[*lenp] = cc;
|
|
|
8b9a1c |
if (v != NULL && v->di_tv.v_type == VAR_FUNC)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 21947,21960 ****
|
|
|
8b9a1c |
if (lv.ll_exp_name != NULL)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
len = (int)STRLEN(lv.ll_exp_name);
|
|
|
8b9a1c |
! name = deref_func_name(lv.ll_exp_name, &len;;
|
|
|
8b9a1c |
if (name == lv.ll_exp_name)
|
|
|
8b9a1c |
name = NULL;
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
else
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
len = (int)(end - *pp);
|
|
|
8b9a1c |
! name = deref_func_name(*pp, &len;;
|
|
|
8b9a1c |
if (name == *pp)
|
|
|
8b9a1c |
name = NULL;
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
--- 21948,21961 ----
|
|
|
8b9a1c |
if (lv.ll_exp_name != NULL)
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
len = (int)STRLEN(lv.ll_exp_name);
|
|
|
8b9a1c |
! name = deref_func_name(lv.ll_exp_name, &len, flags & TFN_NO_AUTOLOAD);
|
|
|
8b9a1c |
if (name == lv.ll_exp_name)
|
|
|
8b9a1c |
name = NULL;
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
else
|
|
|
8b9a1c |
{
|
|
|
8b9a1c |
len = (int)(end - *pp);
|
|
|
8b9a1c |
! name = deref_func_name(*pp, &len, flags & TFN_NO_AUTOLOAD);
|
|
|
8b9a1c |
if (name == *pp)
|
|
|
8b9a1c |
name = NULL;
|
|
|
8b9a1c |
}
|
|
|
8b9a1c |
*** ../vim-7.4.153/src/version.c 2014-01-14 19:35:49.000000000 +0100
|
|
|
8b9a1c |
--- src/version.c 2014-01-14 19:42:05.000000000 +0100
|
|
|
8b9a1c |
***************
|
|
|
8b9a1c |
*** 740,741 ****
|
|
|
8b9a1c |
--- 740,743 ----
|
|
|
8b9a1c |
{ /* Add new patch number below this line */
|
|
|
8b9a1c |
+ /**/
|
|
|
8b9a1c |
+ 154,
|
|
|
8b9a1c |
/**/
|
|
|
8b9a1c |
|
|
|
8b9a1c |
--
|
|
|
8b9a1c |
hundred-and-one symptoms of being an internet addict:
|
|
|
8b9a1c |
162. You go outside and look for a brightness knob to turn down the sun.
|
|
|
8b9a1c |
|
|
|
8b9a1c |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
8b9a1c |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
8b9a1c |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
8b9a1c |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|