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 #9491)
diff --git a/src/typval.c b/src/typval.c
index 23ce712..eb0ef77 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -528,6 +528,7 @@
|| check_for_dict_arg(args, idx) != FAIL);
}
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
/*
* Give an error and return FAIL unless "args[idx]" is a channel or a job.
*/
@@ -576,6 +577,7 @@
return (args[idx].v_type == VAR_UNKNOWN
|| check_for_job_arg(args, idx) != FAIL);
}
+#endif
/*
* Give an error and return FAIL unless "args[idx]" is a string or
@@ -642,6 +644,7 @@
|| check_for_lnum_arg(args, idx));
}
+#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
/*
* Give an error and return FAIL unless "args[idx]" is a string or a blob.
*/
@@ -655,6 +658,7 @@
}
return OK;
}
+#endif
/*
* Give an error and return FAIL unless "args[idx]" is a string or a list.