From e53b71627fb84025fb658a44ee5f90adf276cde7 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Thu, 29 Jul 2021 17:46:45 +0100 Subject: feat(f_msgpackparse): support parsing from Blob Note that it is not possible for msgpack_unpack_next() and msgpack_unpacker_next() to return MSGPACK_UNPACK_EXTRA_BYTES, so it should be fine to abort() on that. Lua 5.1 doesn't support string hex escapes (\xXX) like VimL does (though LuaJIT does), so convert them to decimal escapes (\DDD) in tests. --- runtime/doc/eval.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 013bff3d20..93826660b1 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2535,7 +2535,7 @@ mkdir({name} [, {path} [, {prot}]]) Number create directory {name} mode([expr]) String current editing mode msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack -msgpackparse({list}) List parse msgpack to a list of objects +msgpackparse({data}) List parse msgpack to a list of objects nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} nvim_...({args}...) any call nvim |api| functions @@ -6843,8 +6843,9 @@ msgpackdump({list} [, {type}]) *msgpackdump()* 4. Other strings and |Blob|s are always dumped as BIN strings. 5. Points 3. and 4. do not apply to |msgpack-special-dict|s. -msgpackparse({list}) *msgpackparse()* - Convert a |readfile()|-style list to a list of VimL objects. +msgpackparse({data}) *msgpackparse()* + Convert a |readfile()|-style list or a |Blob| to a list of + VimL objects. Example: > let fname = expand('~/.config/nvim/shada/main.shada') let mpack = readfile(fname, 'b') -- cgit