diff options
author | micha <michoffmann.potsdam@gmail.com> | 2018-06-27 17:08:55 +0200 |
---|---|---|
committer | micha <michoffmann.potsdam@gmail.com> | 2018-07-14 11:47:18 +0200 |
commit | ed02278e42b822a339a12475d81c377271e528f8 (patch) | |
tree | 7eb231c60492fef38288bd46fb9d94131e5ab097 /src/nvim/msgpack_rpc/helpers.c | |
parent | 4874214139ab86f7033d5e6c602f7515ed813443 (diff) | |
download | rneovim-ed02278e42b822a339a12475d81c377271e528f8.tar.gz rneovim-ed02278e42b822a339a12475d81c377271e528f8.tar.bz2 rneovim-ed02278e42b822a339a12475d81c377271e528f8.zip |
channel.c: refactor spaghetti code
channel.c: WIP remove redundant method check and added FUNC_ATTR_NONNULL_ALL macro
channel.c channel_defs.h helpers.c: added Error field to RequestEvent, added no_op handler func
channel.c: use const char* instead of string and cleanup
channel.c; channel_defs.h; helpers.c: removed error from event again; send errors directly to the channel without using handlers and events
channel.c: fixed memory leak and lint errors
api/private/dispatch.c; api/vim.c; msgpack_rpc/channel.c msgpack_rpc/helpers.c added Error* field to msgpack_get_handler_for; further refactored channel.c
channel.c:323 changed order of evaluation in if statement
channel.c: removed superflous whitespace
dispatch.c: review comment
Diffstat (limited to 'src/nvim/msgpack_rpc/helpers.c')
-rw-r--r-- | src/nvim/msgpack_rpc/helpers.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c index e18c4472b5..19cc31f6a6 100644 --- a/src/nvim/msgpack_rpc/helpers.c +++ b/src/nvim/msgpack_rpc/helpers.c @@ -488,25 +488,6 @@ void msgpack_rpc_from_dictionary(Dictionary result, msgpack_packer *res) } } -/// Handler executed when an invalid method name is passed -Object msgpack_rpc_handle_missing_method(uint64_t channel_id, - Array args, - Error *error) -{ - api_set_error(error, kErrorTypeException, "Invalid method: %s", - args.size > 0 ? args.items[0].data.string.data : "?"); - return NIL; -} - -/// Handler executed when malformated arguments are passed -Object msgpack_rpc_handle_invalid_arguments(uint64_t channel_id, - Array args, - Error *error) -{ - api_set_error(error, kErrorTypeException, "Invalid method arguments"); - return NIL; -} - /// Serializes a msgpack-rpc request or notification(id == 0) void msgpack_rpc_serialize_request(uint64_t request_id, const String method, |