diff options
| author | bfredl <bjorn.linse@gmail.com> | 2024-06-27 18:45:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-27 18:45:18 +0200 |
| commit | 46187117c9464dd6c09eae8e47bb279d72a01038 (patch) | |
| tree | cffb3d6a5b9875893ae4de6457a656542856dc93 /src/nvim/lua/converter.c | |
| parent | 724d1110b1e4699a34f489e9cdb2d25098746499 (diff) | |
| parent | bda63d5b97dfb333de6f4bd757dbb978906062a2 (diff) | |
| download | rneovim-46187117c9464dd6c09eae8e47bb279d72a01038.tar.gz rneovim-46187117c9464dd6c09eae8e47bb279d72a01038.tar.bz2 rneovim-46187117c9464dd6c09eae8e47bb279d72a01038.zip | |
Merge pull request #29483 from bfredl/nonbinary
refactor(typval)!: remove binary distinction of binary and nonbinary strings
Diffstat (limited to 'src/nvim/lua/converter.c')
| -rw-r--r-- | src/nvim/lua/converter.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c index 1b1794e244..c8ad6606bf 100644 --- a/src/nvim/lua/converter.c +++ b/src/nvim/lua/converter.c @@ -219,12 +219,7 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv) if (cur.special) { list_T *const kv_pair = tv_list_alloc(2); - typval_T s_tv = decode_string(s, len, kTrue, false, false); - if (s_tv.v_type == VAR_UNKNOWN) { - ret = false; - tv_list_unref(kv_pair); - continue; - } + typval_T s_tv = decode_string(s, len, true, false); tv_list_append_owned_tv(kv_pair, s_tv); // Value: not populated yet, need to create list item to push. @@ -280,10 +275,7 @@ bool nlua_pop_typval(lua_State *lstate, typval_T *ret_tv) case LUA_TSTRING: { size_t len; const char *s = lua_tolstring(lstate, -1, &len); - *cur.tv = decode_string(s, len, kNone, true, false); - if (cur.tv->v_type == VAR_UNKNOWN) { - ret = false; - } + *cur.tv = decode_string(s, len, false, false); break; } case LUA_TNUMBER: { |
