Mercurial > vim
comparison src/typval.c @ 27018:268f6a3511df v8.2.4038
patch 8.2.4038: various code not used when features are disabled
Commit: https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Sat Jan 8 12:41:16 2022 +0000
patch 8.2.4038: various code not used when features are disabled
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/9491)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 13:45:04 +0100 |
parents | ac75c145f0a9 |
children | b31cc7630773 |
comparison
equal
deleted
inserted
replaced
27017:da790d50f73d | 27018:268f6a3511df |
---|---|
526 { | 526 { |
527 return (args[idx].v_type == VAR_UNKNOWN | 527 return (args[idx].v_type == VAR_UNKNOWN |
528 || check_for_dict_arg(args, idx) != FAIL); | 528 || check_for_dict_arg(args, idx) != FAIL); |
529 } | 529 } |
530 | 530 |
531 #if defined(FEAT_JOB_CHANNEL) || defined(PROTO) | |
531 /* | 532 /* |
532 * Give an error and return FAIL unless "args[idx]" is a channel or a job. | 533 * Give an error and return FAIL unless "args[idx]" is a channel or a job. |
533 */ | 534 */ |
534 int | 535 int |
535 check_for_chan_or_job_arg(typval_T *args, int idx) | 536 check_for_chan_or_job_arg(typval_T *args, int idx) |
574 check_for_opt_job_arg(typval_T *args, int idx) | 575 check_for_opt_job_arg(typval_T *args, int idx) |
575 { | 576 { |
576 return (args[idx].v_type == VAR_UNKNOWN | 577 return (args[idx].v_type == VAR_UNKNOWN |
577 || check_for_job_arg(args, idx) != FAIL); | 578 || check_for_job_arg(args, idx) != FAIL); |
578 } | 579 } |
580 #endif | |
579 | 581 |
580 /* | 582 /* |
581 * Give an error and return FAIL unless "args[idx]" is a string or | 583 * Give an error and return FAIL unless "args[idx]" is a string or |
582 * a number. | 584 * a number. |
583 */ | 585 */ |
640 { | 642 { |
641 return (args[idx].v_type == VAR_UNKNOWN | 643 return (args[idx].v_type == VAR_UNKNOWN |
642 || check_for_lnum_arg(args, idx)); | 644 || check_for_lnum_arg(args, idx)); |
643 } | 645 } |
644 | 646 |
647 #if defined(FEAT_JOB_CHANNEL) || defined(PROTO) | |
645 /* | 648 /* |
646 * Give an error and return FAIL unless "args[idx]" is a string or a blob. | 649 * Give an error and return FAIL unless "args[idx]" is a string or a blob. |
647 */ | 650 */ |
648 int | 651 int |
649 check_for_string_or_blob_arg(typval_T *args, int idx) | 652 check_for_string_or_blob_arg(typval_T *args, int idx) |
653 semsg(_(e_string_or_blob_required_for_argument_nr), idx + 1); | 656 semsg(_(e_string_or_blob_required_for_argument_nr), idx + 1); |
654 return FAIL; | 657 return FAIL; |
655 } | 658 } |
656 return OK; | 659 return OK; |
657 } | 660 } |
661 #endif | |
658 | 662 |
659 /* | 663 /* |
660 * Give an error and return FAIL unless "args[idx]" is a string or a list. | 664 * Give an error and return FAIL unless "args[idx]" is a string or a list. |
661 */ | 665 */ |
662 int | 666 int |