aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-08-02 19:35:06 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-15 21:19:29 +0100
commit10aa60e806c300cc7bd1f84e52b4b043d6fac537 (patch)
treeb57fac817affcae0a53d5a2e1fbe79266c0a17ec /src
parentbfeecd0b418cf03a974c57082f4fc647b90aef06 (diff)
downloadrneovim-10aa60e806c300cc7bd1f84e52b4b043d6fac537.tar.gz
rneovim-10aa60e806c300cc7bd1f84e52b4b043d6fac537.tar.bz2
rneovim-10aa60e806c300cc7bd1f84e52b4b043d6fac537.zip
feat(nlua): convert Blobs to strings
Diffstat (limited to 'src')
-rw-r--r--src/nvim/lua/converter.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c
index 007ef336cd..0adbbdb953 100644
--- a/src/nvim/lua/converter.c
+++ b/src/nvim/lua/converter.c
@@ -482,7 +482,12 @@ static bool typval_conv_special = false;
TYPVAL_ENCODE_CONV_NIL(tv)
#define TYPVAL_ENCODE_CONV_BLOB(tv, blob, len) \
- abort() /* TODO(seandewar) */ \
+ do { \
+ const blob_T *const blob_ = (blob); \
+ lua_pushlstring(lstate, \
+ blob_ != NULL ? (const char *)blob_->bv_ga.ga_data : "", \
+ (size_t)(len)); \
+ } while (0)
#define TYPVAL_ENCODE_CONV_FUNC_START(tv, fun) \
do { \