api: auto generate api function wrappers for viml

This commit is contained in:
Björn Linse
2016-06-18 12:06:50 +02:00
parent de3a515123
commit 3bd3b3b768
6 changed files with 77 additions and 35 deletions

View File

@@ -3,13 +3,15 @@
#include "nvim/api/private/defs.h"
typedef Object (*ApiDispatchWrapper)(uint64_t channel_id,
uint64_t request_id,
Array args,
Error *error);
/// The rpc_method_handlers table, used in msgpack_rpc_dispatch(), stores
/// functions of this type.
typedef struct {
Object (*fn)(uint64_t channel_id,
uint64_t request_id,
Array args,
Error *error);
ApiDispatchWrapper fn;
bool async; // function is always safe to run immediately instead of being
// put in a request queue for handling when nvim waits for input.
} MsgpackRpcRequestHandler;