@@ -42,15 +42,6 @@ void mpack_write(mpack_writer_t* writer, const std::unordered_map<std::string, O
42
42
mpack_finish_map (writer);
43
43
}
44
44
45
- template <typename T>
46
- void mpack_write (mpack_writer_t *) {
47
- mpack_start_array (writer, data.size ());
48
- for (const auto & e : data) {
49
- mpack_write (writer, e);
50
- }
51
- mpack_finish_array (writer);
52
- }
53
-
54
45
Object mpack_read_object (mpack_reader_t * reader) {
55
46
Object result{};
56
47
const mpack_tag_t tag = mpack_peek_tag (reader);
@@ -150,6 +141,10 @@ template<>
150
141
Containers::Array<std::string> mpack_read<Containers::Array<std::string>>(mpack_reader_t * reader) {
151
142
return mpack_read_array<std::string>(reader);
152
143
}
144
+ template <>
145
+ Containers::Array<std::unordered_map<std::string, Object>> mpack_read<Containers::Array<std::unordered_map<std::string, Object>>>(mpack_reader_t * reader) {
146
+ return mpack_read_array<std::unordered_map<std::string, Object>>(reader);
147
+ }
153
148
154
149
NeovimApi{{api_level}}::NeovimApi{{api_level}}(int port, int receiveBufferSize):
155
150
NeovimApi{{api_level}}{" 127.0.0.1" , port, receiveBufferSize}
@@ -186,7 +181,7 @@ Int NeovimApi{{api_level}}::dispatch(const std::string& func, Args... args) {
186
181
return msgId;
187
182
}
188
183
189
- std::unique_ptr<Notification> NeovimApi2 ::waitForNotification (Int timeout) {
184
+ std::unique_ptr<Notification> NeovimApi{{api_level}} ::waitForNotification(Int timeout) {
190
185
if (!_notifications.empty ()) {
191
186
/* Move notification to heap */
192
187
auto n = std::move (_notifications.front ());
@@ -203,7 +198,7 @@ std::unique_ptr<Notification> NeovimApi2::waitForNotification(Int timeout) {
203
198
return std::make_unique<Notification>(Containers::Array<char >(nullptr ));
204
199
}
205
200
if (response.size () == _receiveBuffer.size ()) {
206
- Warning () << " NeovimApi2 ::waitForResponse(): Receive buffer was full" ;
201
+ Warning () << " NeovimApi{{api_level}} ::waitForResponse(): Receive buffer was full" ;
207
202
// TODO: Handle requests over multiple buffers
208
203
}
209
204
0 commit comments