mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.3438: cannot manipulate blobs
Problem: Cannot manipulate blobs. Solution: Add blob2list() and list2blob(). (Yegappan Lakshmanan, closes #8868)
This commit is contained in:
committed by
Bram Moolenaar
parent
f5785cf059
commit
5dfe467432
17
src/typval.c
17
src/typval.c
@@ -470,6 +470,23 @@ check_for_opt_bool_arg(typval_T *args, int idx)
|
||||
return check_for_bool_arg(args, idx);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user