diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-26 16:41:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-26 16:41:35 +0200 |
commit | 6e7a8c3fe282a0a2991be49dc388e5e484f88387 (patch) | |
tree | eed287da4fb240f69e7e0c76adeba36e79be053d /src/nvim/msgpack_rpc/helpers.c | |
parent | 46a4099dfbc5066969f334b42bc5d92b1384db32 (diff) | |
parent | 0f442c328e33a0c742df9283c1944c077d202a77 (diff) | |
download | rneovim-6e7a8c3fe282a0a2991be49dc388e5e484f88387.tar.gz rneovim-6e7a8c3fe282a0a2991be49dc388e5e484f88387.tar.bz2 rneovim-6e7a8c3fe282a0a2991be49dc388e5e484f88387.zip |
Merge #7081 from justinmk/rpcstop
rpc: close channel if stream was closed
Diffstat (limited to 'src/nvim/msgpack_rpc/helpers.c')
-rw-r--r-- | src/nvim/msgpack_rpc/helpers.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c index 444c6cc256..fecae11d45 100644 --- a/src/nvim/msgpack_rpc/helpers.c +++ b/src/nvim/msgpack_rpc/helpers.c @@ -88,7 +88,12 @@ bool msgpack_rpc_to_object(const msgpack_object *const obj, Object *const arg) { bool ret = true; kvec_t(MPToAPIObjectStackItem) stack = KV_INITIAL_VALUE; - kv_push(stack, ((MPToAPIObjectStackItem) { obj, arg, false, 0 })); + kv_push(stack, ((MPToAPIObjectStackItem) { + .mobj = obj, + .aobj = arg, + .container = false, + .idx = 0, + })); while (ret && kv_size(stack)) { MPToAPIObjectStackItem cur = kv_last(stack); if (!cur.container) { @@ -361,7 +366,7 @@ typedef struct { size_t idx; } APIToMPObjectStackItem; -/// Convert type used by Neovim API to msgpack +/// Convert type used by Nvim API to msgpack type. /// /// @param[in] result Object to convert. /// @param[out] res Structure that defines where conversion results are saved. |