summaryrefslogtreecommitdiffstats
path: root/src/typval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/typval.c')
-rw-r--r--src/typval.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/typval.c b/src/typval.c
index a445bf8e9a..b1a0060467 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -619,6 +619,16 @@ check_for_opt_job_arg(typval_T *args, int idx)
return (args[idx].v_type == VAR_UNKNOWN
|| check_for_job_arg(args, idx) != FAIL) ? OK : FAIL;
}
+#else
+/*
+ * Give an error and return FAIL unless "args[idx]" is an optional channel or a
+ * job. Used without the +channel feature, thus only VAR_UNKNOWN is accepted.
+ */
+ int
+check_for_opt_chan_or_job_arg(typval_T *args, int idx)
+{
+ return args[idx].v_type == VAR_UNKNOWN ? OK : FAIL;
+}
#endif
/*