mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.0-134
This commit is contained in:
parent
df40adfcf4
commit
b47a240593
18
src/eval.c
18
src/eval.c
@ -5520,19 +5520,27 @@ tv_equal(tv1, tv2, ic)
|
|||||||
{
|
{
|
||||||
char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
|
char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN];
|
||||||
char_u *s1, *s2;
|
char_u *s1, *s2;
|
||||||
|
static int recursive = 0; /* cach recursive loops */
|
||||||
|
int r;
|
||||||
|
|
||||||
if (tv1->v_type != tv2->v_type)
|
/* Catch lists and dicts that have an endless loop by limiting
|
||||||
|
* recursiveness to 1000. */
|
||||||
|
if (tv1->v_type != tv2->v_type || recursive >= 1000)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
switch (tv1->v_type)
|
switch (tv1->v_type)
|
||||||
{
|
{
|
||||||
case VAR_LIST:
|
case VAR_LIST:
|
||||||
/* recursive! */
|
++recursive;
|
||||||
return list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
|
r = list_equal(tv1->vval.v_list, tv2->vval.v_list, ic);
|
||||||
|
--recursive;
|
||||||
|
return r;
|
||||||
|
|
||||||
case VAR_DICT:
|
case VAR_DICT:
|
||||||
/* recursive! */
|
++recursive;
|
||||||
return dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
|
r = dict_equal(tv1->vval.v_dict, tv2->vval.v_dict, ic);
|
||||||
|
--recursive;
|
||||||
|
return r;
|
||||||
|
|
||||||
case VAR_FUNC:
|
case VAR_FUNC:
|
||||||
return (tv1->vval.v_string != NULL
|
return (tv1->vval.v_string != NULL
|
||||||
|
@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
134,
|
||||||
/**/
|
/**/
|
||||||
133,
|
133,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user