Skip to content

Commit

Permalink
String data that gets sent via MsgPack should be declared as string, …
Browse files Browse the repository at this point in the history
…too.
  • Loading branch information
phmarek committed Dec 30, 2014
1 parent a31bcfb commit 5a91c7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/nvim/msgpack_rpc/helpers.c
Expand Up @@ -224,8 +224,8 @@ void msgpack_rpc_from_float(Float result, msgpack_packer *res)
void msgpack_rpc_from_string(String result, msgpack_packer *res)
FUNC_ATTR_NONNULL_ARG(2)
{
msgpack_pack_bin(res, result.size);
msgpack_pack_bin_body(res, result.data, result.size);
msgpack_pack_str(res, result.size);
msgpack_pack_str_body(res, result.data, result.size);
}

void msgpack_rpc_from_object(Object result, msgpack_packer *res)
Expand Down Expand Up @@ -305,8 +305,8 @@ void msgpack_rpc_error(char *msg, msgpack_packer *res)
size_t len = strlen(msg);

// error message
msgpack_pack_bin(res, len);
msgpack_pack_bin_body(res, msg, len);
msgpack_pack_str(res, len);
msgpack_pack_str_body(res, msg, len);
// Nil result
msgpack_pack_nil(res);
}
Expand Down

1 comment on commit 5a91c7e

@tarruda
Copy link

@tarruda tarruda commented on 5a91c7e Feb 4, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot do this: neovim#1758 (comment)

Please sign in to comment.