diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-06-25 15:33:47 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-06-27 11:04:04 +0200 |
commit | bda63d5b97dfb333de6f4bd757dbb978906062a2 (patch) | |
tree | 65b2460064f42b39e33bf7bc7507f973b907dd37 /runtime/lua/vim/_meta/vimfn.lua | |
parent | 9e436251de0329b1479365ff162d87ef18d6d14c (diff) | |
download | rneovim-bda63d5b97dfb333de6f4bd757dbb978906062a2.tar.gz rneovim-bda63d5b97dfb333de6f4bd757dbb978906062a2.tar.bz2 rneovim-bda63d5b97dfb333de6f4bd757dbb978906062a2.zip |
refactor(typval)!: remove distinction of binary and nonbinary strings
This is a breaking change which will make refactor of typval and shada
code a lot easier. In particular, code that would use or check for
v:msgpack_types.binary in the wild would be broken. This appears to be
rarely used in existing plugins.
Also some cases where v:msgpack_type.string would be used to represent a
binary string of "string" type, we use a BLOB instead, which is
vimscripts native type for binary blobs, and already was used for BIN
formats when necessary.
msgpackdump(msgpackparse(data)) no longer preserves the distinction
of BIN and STR strings. This is very common behavior for
language-specific msgpack bindings. Nvim uses msgpack as a tool to
serialize its data. Nvim is not a tool to bit-perfectly manipulate
arbitrary msgpack data out in the wild.
The changed tests should indicate how behavior changes in various edge
cases.
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
-rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 11dcbc010b..9d4cc825ec 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -6177,12 +6177,7 @@ function vim.fn.msgpackdump(list, type) end --- C parser does not support such values. --- float |Float|. This value cannot possibly appear in --- |msgpackparse()| output. ---- string |readfile()|-style list of strings. This value will ---- appear in |msgpackparse()| output if string contains ---- zero byte or if string is a mapping key and mapping is ---- being represented as special dictionary for other ---- reasons. ---- binary |String|, or |Blob| if binary string contains zero +--- string |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()| |