patch 8.2.3438: cannot manipulate blobs
Problem: Cannot manipulate blobs.
Solution: Add blob2list() and list2blob(). (Yegappan Lakshmanan,
closes #8868)
diff --git a/src/typval.c b/src/typval.c
index 3a0e2e5..c859122 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -471,6 +471,23 @@
}
/*
+ * Give an error and return FAIL unless "args[idx]" is a blob.
+ */
+ int
+check_for_blob_arg(typval_T *args, int idx)
+{
+ if (args[idx].v_type != VAR_BLOB)
+ {
+ if (idx >= 0)
+ semsg(_(e_blob_required_for_argument_nr), idx + 1);
+ else
+ emsg(_(e_blob_required));
+ return FAIL;
+ }
+ return OK;
+}
+
+/*
* Give an error and return FAIL unless "args[idx]" is a list.
*/
int