robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
38986188ba
master
1#pragma once 2 3#include <stdbool.h> 4#include <stdint.h> 5 6#include "nvim/api/private/defs.h" // IWYU pragma: keep 7#include "nvim/memory_defs.h" 8#include "nvim/types_defs.h" 9 10typedef Object (* ApiDispatchWrapper )(uint64_t channel_id ,Array args ,Arena * arena ,Error * error ); 11 12/// The rpc_method_handlers table, used in msgpack_rpc_dispatch(), stores 13/// functions of this type. 14struct MsgpackRpcRequestHandler { 15const char * name ; 16ApiDispatchWrapper fn ; 17bool fast ;///< Function is safe to be executed immediately while running the 18///< uv loop (the loop is run very frequently due to breakcheck). 19///< If "fast" is false, the function is deferred, i e the call will 20///< be put in the event queue, for safe handling later. 21bool ret_alloc ;///< return value is allocated and should be freed using api_free_object 22///< otherwise it uses arena and/or static memory 23}; 24 25extern const MsgpackRpcRequestHandler method_handlers []; 26 27#include "api/private/dispatch.h.generated.h" 28#include "api/private/dispatch_wrappers.h.generated.h" 29#include "keysets_defs.generated.h"