summaryrefslogtreecommitdiffstats
path: root/src/typval.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:39:57 +0000
commitaafdfa61bb0af95e98ca825d1f7839801c22d434 (patch)
treeb792417ed6c2f7764f816aecd177e46b1baad149 /src/typval.c
parentAdding debian version 2:9.1.0016-1. (diff)
downloadvim-aafdfa61bb0af95e98ca825d1f7839801c22d434.tar.xz
vim-aafdfa61bb0af95e98ca825d1f7839801c22d434.zip
Merging upstream version 2:9.1.0199.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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 af96b31..62958f6 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -623,6 +623,16 @@ check_for_opt_dict_arg(typval_T *args, int idx)
|| check_for_dict_arg(args, idx) != FAIL) ? OK : FAIL;
}
+/*
+ * Check for an optional non-NULL dict argument at 'idx'
+ */
+ int
+check_for_opt_nonnull_dict_arg(typval_T *args, int idx)
+{
+ return (args[idx].v_type == VAR_UNKNOWN
+ || check_for_nonnull_dict_arg(args, idx) != FAIL) ? OK : FAIL;
+}
+
#if defined(FEAT_JOB_CHANNEL) || defined(PROTO)
/*
* Give an error and return FAIL unless "args[idx]" is a channel or a job.