1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 23:02:35 +03:00

Use CFData

This commit is contained in:
Tae Won Ha 2018-05-11 17:30:34 +02:00
parent 46d6d97354
commit 92d7cb54f4
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -116,9 +116,11 @@ static void send_msg_packing(NvimServerMsgId msgid, pack_block body) {
body(&packer); body(&packer);
var data = [[NSData alloc] initWithBytesNoCopy:msg_sbuffer.data length:msg_sbuffer.size freeWhenDone:false]; let data = CFDataCreateWithBytesNoCopy(
kCFAllocatorDefault, (const UInt8 *) msg_sbuffer.data, msg_sbuffer.size, kCFAllocatorNull
);
[_neovim_server sendMessageWithId:msgid data:data]; [_neovim_server sendMessageWithId:msgid data:data];
[data release]; CFRelease(data);
msgpack_sbuffer_clear(&msg_sbuffer); msgpack_sbuffer_clear(&msg_sbuffer);
} }