Patch 8.2.3436

6 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 13, 2021, 3:37:05 PM9/13/21
to vim...@googlegroups.com

Patch 8.2.3436
Problem: Check for optional bool type has confusing return type.
Solution: Explicitly return OK.
Files: src/typval.c


*** ../vim-8.2.3435/src/typval.c 2021-08-15 13:49:38.126905573 +0200
--- src/typval.c 2021-09-13 21:35:33.021155844 +0200
***************
*** 459,471 ****
}

/*
! * Check for an optional bool argument at 'idx'
*/
int
check_for_opt_bool_arg(typval_T *args, int idx)
{
! return (args[idx].v_type == VAR_UNKNOWN
! || check_for_bool_arg(args, idx) != FAIL);
}

/*
--- 459,473 ----
}

/*
! * Check for an optional bool argument at 'idx'.
! * Return FAIL if the type is wrong.
*/
int
check_for_opt_bool_arg(typval_T *args, int idx)
{
! if (args[idx].v_type == VAR_UNKNOWN)
! return OK;
! return check_for_bool_arg(args, idx);
}

/*
*** ../vim-8.2.3435/src/version.c 2021-09-13 18:25:50.456525311 +0200
--- src/version.c 2021-09-13 21:35:49.013141674 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3436,
/**/

--
How To Keep A Healthy Level Of Insanity:
8. Don't use any punctuation marks.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages