patch 9.0.0430: cannot use repeat() with a blob
Problem: Cannot use repeat() with a blob.
Solution: Implement blob repeat. (closes #11090)
diff --git a/src/typval.c b/src/typval.c
index 12a741e..95abe21 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -792,6 +792,24 @@
}
/*
+ * Give an error and return FAIL unless "args[idx]" is a string or a number
+ * or a list or a blob.
+ */
+ int
+check_for_string_or_number_or_list_or_blob_arg(typval_T *args, int idx)
+{
+ if (args[idx].v_type != VAR_STRING
+ && args[idx].v_type != VAR_NUMBER
+ && args[idx].v_type != VAR_LIST
+ && args[idx].v_type != VAR_BLOB)
+ {
+ semsg(_(e_string_number_list_or_blob_required_for_argument_nr), idx + 1);
+ return FAIL;
+ }
+ return OK;
+}
+
+/*
* Give an error and return FAIL unless "args[idx]" is a string or a list
* or a dict.
*/