Patch 8.2.4556
Problem:    Test fails without the +job or +channel feature. (Dominique Pellé)
Solution:   Adjust #ifdefs.  Pass on skip flag. (closes #9942)
Files:      src/eval.c, src/vim9compile.c


*** ../vim-8.2.4555/src/eval.c  2022-03-10 20:01:47.119865247 +0000
--- src/eval.c  2022-03-13 12:58:11.313638672 +0000
***************
*** 3515,3529 ****
                    return OK;
                }
                break;
- #ifdef FEAT_JOB_CHANNEL
        case 8: if (STRNCMP(s, "null_job", 8) == 0)
                {
                    rettv->v_type = VAR_JOB;
                    rettv->vval.v_job = NULL;
                    return OK;
                }
                break;
- #endif
        case 9:
                if (STRNCMP(s, "null_", 5) != 0)
                    break;
--- 3515,3532 ----
                    return OK;
                }
                break;
        case 8: if (STRNCMP(s, "null_job", 8) == 0)
                {
+ #ifdef FEAT_JOB_CHANNEL
                    rettv->v_type = VAR_JOB;
                    rettv->vval.v_job = NULL;
+ #else
+                   rettv->v_type = VAR_SPECIAL;
+                   rettv->vval.v_number = VVAL_NULL;
+ #endif
                    return OK;
                }
                break;
        case 9:
                if (STRNCMP(s, "null_", 5) != 0)
                    break;
***************
*** 3554,3567 ****
                }
                break;
        case 12:
- #ifdef FEAT_JOB_CHANNEL
                if (STRNCMP(s, "null_channel", 12) == 0)
                {
                    rettv->v_type = VAR_CHANNEL;
                    rettv->vval.v_channel = NULL;
                    return OK;
                }
- #endif
                if (STRNCMP(s, "null_partial", 12) == 0)
                {
                    rettv->v_type = VAR_PARTIAL;
--- 3557,3573 ----
                }
                break;
        case 12:
                if (STRNCMP(s, "null_channel", 12) == 0)
                {
+ #ifdef FEAT_JOB_CHANNEL
                    rettv->v_type = VAR_CHANNEL;
                    rettv->vval.v_channel = NULL;
+ #else
+                   rettv->v_type = VAR_SPECIAL;
+                   rettv->vval.v_number = VVAL_NULL;
+ #endif
                    return OK;
                }
                if (STRNCMP(s, "null_partial", 12) == 0)
                {
                    rettv->v_type = VAR_PARTIAL;
*** ../vim-8.2.4555/src/vim9compile.c   2022-03-10 19:23:24.329580643 +0000
--- src/vim9compile.c   2022-03-13 13:03:51.544930886 +0000
***************
*** 762,767 ****
--- 762,768 ----
  {
      eap->getline = exarg_getline;
      eap->cookie = cctx;
+     eap->skip = cctx->ctx_skip == SKIP_YES;
  }
  
  /*
***************
*** 855,861 ****
        semsg(_(e_namespace_not_supported_str), name_start);
        return NULL;
      }
!     if (check_defined(name_start, name_end - name_start, cctx,
                                                          NULL, FALSE) == FAIL)
        return NULL;
      if (!ASCII_ISUPPER(is_global ? name_start[2] : name_start[0]))
--- 856,863 ----
        semsg(_(e_namespace_not_supported_str), name_start);
        return NULL;
      }
!     if (cctx->ctx_skip != SKIP_YES
!           && check_defined(name_start, name_end - name_start, cctx,
                                                          NULL, FALSE) == FAIL)
        return NULL;
      if (!ASCII_ISUPPER(is_global ? name_start[2] : name_start[0]))
*** ../vim-8.2.4555/src/version.c       2022-03-13 12:06:02.076218096 +0000
--- src/version.c       2022-03-13 12:58:56.881547182 +0000
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4556,
  /**/

-- 
Hear about the guy who played a blank tape at full blast?
The mime next door went nuts.

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220313131308.DFBCD1C79E4%40moolenaar.net.

Raspunde prin e-mail lui