Patch 8.2.2020

6 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 20, 2020, 1:00:12 PM11/20/20
to vim...@googlegroups.com

Patch 8.2.2020
Problem: Some compilers do not like the "namespace" argument.
Solution: Rename to "use_namespace". (closes #7332)
Files: src/vim9compile.c, src/proto/vim9compile.pro


*** ../vim-8.2.2019/src/vim9compile.c 2020-11-19 18:53:15.184492586 +0100
--- src/vim9compile.c 2020-11-20 18:57:56.234370990 +0100
***************
*** 2767,2778 ****
/*
* Find the end of a variable or function name. Unlike find_name_end() this
* does not recognize magic braces.
! * When "namespace" is TRUE recognize "b:", "s:", etc.
* Return a pointer to just after the name. Equal to "arg" if there is no
* valid name.
*/
char_u *
! to_name_end(char_u *arg, int namespace)
{
char_u *p;

--- 2767,2778 ----
/*
* Find the end of a variable or function name. Unlike find_name_end() this
* does not recognize magic braces.
! * When "use_namespace" is TRUE recognize "b:", "s:", etc.
* Return a pointer to just after the name. Equal to "arg" if there is no
* valid name.
*/
char_u *
! to_name_end(char_u *arg, int use_namespace)
{
char_u *p;

***************
*** 2784,2790 ****
// Include a namespace such as "s:var" and "v:var". But "n:" is not
// and can be used in slice "[n:]".
if (*p == ':' && (p != arg + 1
! || !namespace
|| vim_strchr(VIM9_NAMESPACE_CHAR, *arg) == NULL))
break;
return p;
--- 2784,2790 ----
// Include a namespace such as "s:var" and "v:var". But "n:" is not
// and can be used in slice "[n:]".
if (*p == ':' && (p != arg + 1
! || !use_namespace
|| vim_strchr(VIM9_NAMESPACE_CHAR, *arg) == NULL))
break;
return p;
*** ../vim-8.2.2019/src/proto/vim9compile.pro 2020-11-19 18:53:15.188492574 +0100
--- src/proto/vim9compile.pro 2020-11-20 18:58:50.538248797 +0100
***************
*** 8,14 ****
int vim9_comment_start(char_u *p);
char_u *peek_next_line_from_context(cctx_T *cctx);
char_u *next_line_from_context(cctx_T *cctx, int skip_comment);
! char_u *to_name_end(char_u *arg, int namespace);
char_u *to_name_const_end(char_u *arg);
exptype_T get_compare_type(char_u *p, int *len, int *type_is);
void error_white_both(char_u *op, int len);
--- 8,14 ----
int vim9_comment_start(char_u *p);
char_u *peek_next_line_from_context(cctx_T *cctx);
char_u *next_line_from_context(cctx_T *cctx, int skip_comment);
! char_u *to_name_end(char_u *arg, int use_namespace);
char_u *to_name_const_end(char_u *arg);
exptype_T get_compare_type(char_u *p, int *len, int *type_is);
void error_white_both(char_u *op, int len);
*** ../vim-8.2.2019/src/version.c 2020-11-20 09:10:11.427730168 +0100
--- src/version.c 2020-11-20 18:58:45.378260676 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2020,
/**/

--
Life would be so much easier if we could just look at the source code.

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