From aafdfa61bb0af95e98ca825d1f7839801c22d434 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 09:39:57 +0200 Subject: Merging upstream version 2:9.1.0199. Signed-off-by: Daniel Baumann --- src/typval.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/typval.c') 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. -- cgit v1.2.3