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