From de9df825d5e38e6a9e5ba254d1d27cb3cfc9f557 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Sat, 31 Jul 2021 21:45:58 +0100 Subject: feat(decode_string): decode binary string with NULs to Blob Strings that previously decoded into a msgpack special for representing BINs with NULs now convert to Blobs. It shouldn't be possible to decode into this special anymore after this change? Notably, Lua strings with NULs now convert to Blobs when passed to VimL. --- runtime/doc/eval.txt | 6 +++--- runtime/doc/lua.txt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index e7820f5313..70f970ffef 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -6750,9 +6750,9 @@ msgpackparse({list}) *msgpackparse()* zero byte or if string is a mapping key and mapping is being represented as special dictionary for other reasons. - binary |readfile()|-style list of strings. This value will - appear in |msgpackparse()| output if binary string - contains zero byte. + binary |String|, or |Blob| if binary string contains zero + byte. This value cannot appear in |msgpackparse()| + output since blobs were introduced. array |List|. This value cannot appear in |msgpackparse()| output. *msgpack-special-map* diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 032c28c659..53d68fa5e6 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -326,7 +326,8 @@ semantically equivalent in Lua to: end Lua nils, numbers, strings, tables and booleans are converted to their -respective Vimscript types. Conversion of other Lua types is an error. +respective Vimscript types. If a Lua string contains a NUL byte, it will be +converted to a |Blob|. Conversion of other Lua types is an error. The magic global "_A" contains the second argument to luaeval(). -- cgit