mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 01:51:52 +00:00
refactor: format #15702
This commit is contained in:
@@ -1,38 +1,35 @@
|
||||
// This is an open source non-commercial project. Dear PVS-Studio, please check
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <msgpack.h>
|
||||
|
||||
#include "nvim/map.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/msgpack_rpc/helpers.h"
|
||||
#include "nvim/api/private/dispatch.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "nvim/api/buffer.h"
|
||||
#include "nvim/api/deprecated.h"
|
||||
#include "nvim/api/private/defs.h"
|
||||
#include "nvim/api/private/dispatch.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/api/tabpage.h"
|
||||
#include "nvim/api/ui.h"
|
||||
#include "nvim/api/vim.h"
|
||||
#include "nvim/api/window.h"
|
||||
#include "nvim/api/deprecated.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/map.h"
|
||||
#include "nvim/msgpack_rpc/helpers.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
static Map(String, MsgpackRpcRequestHandler) methods = MAP_INIT;
|
||||
|
||||
static void msgpack_rpc_add_method_handler(String method,
|
||||
MsgpackRpcRequestHandler handler)
|
||||
static void msgpack_rpc_add_method_handler(String method, MsgpackRpcRequestHandler handler)
|
||||
{
|
||||
map_put(String, MsgpackRpcRequestHandler)(&methods, method, handler);
|
||||
}
|
||||
|
||||
/// @param name API method name
|
||||
/// @param name_len name size (includes terminating NUL)
|
||||
MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name,
|
||||
size_t name_len,
|
||||
MsgpackRpcRequestHandler msgpack_rpc_get_handler_for(const char *name, size_t name_len,
|
||||
Error *error)
|
||||
{
|
||||
String m = { .data = (char *)name, .size = name_len };
|
||||
|
||||
Reference in New Issue
Block a user