patch 7.4.1231
Problem: JSON messages are not parsed properly.
Solution: Queue received messages.
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index e0fbda8..16946eb 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -4,7 +4,6 @@
void channel_set_json_mode(int idx, int json_mode);
void channel_set_callback(int idx, char_u *callback);
void channel_set_req_callback(int idx, char_u *callback);
-int channel_decode_json(char_u *msg, typval_T *tv1, typval_T *tv2, typval_T *tv3);
int channel_is_open(int idx);
void channel_close(int idx);
int channel_save(int idx, char_u *buf, int len);
@@ -15,6 +14,8 @@
int channel_get_id(void);
void channel_read(int idx);
char_u *channel_read_block(int idx);
+int channel_read_json_block(int ch_idx, int id, typval_T **rettv);
+void channel_read_json(int ch_idx);
int channel_socket2idx(sock_T fd);
int channel_send(int idx, char_u *buf, char *fun);
int channel_poll_setup(int nfd_in, void *fds_in);
diff --git a/src/proto/eval.pro b/src/proto/eval.pro
index ea2096a..d1f5c3c 100644
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -101,6 +101,7 @@
char_u *v_exception(char_u *oldval);
char_u *v_throwpoint(char_u *oldval);
char_u *set_cmdarg(exarg_T *eap, char_u *oldarg);
+typval_T *alloc_tv(void);
void free_tv(typval_T *varp);
void clear_tv(typval_T *varp);
long get_tv_number_chk(typval_T *varp, int *denote);
diff --git a/src/proto/json.pro b/src/proto/json.pro
index 48ce9ad..0b39e84 100644
--- a/src/proto/json.pro
+++ b/src/proto/json.pro
@@ -1,5 +1,5 @@
/* json.c */
char_u *json_encode(typval_T *val);
char_u *json_encode_nr_expr(int nr, typval_T *val);
-void json_decode(js_read_T *reader, typval_T *res);
+int json_decode(js_read_T *reader, typval_T *res);
/* vim: set ft=c : */