mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
API: Refactor: Implement api/handle module
This module will be used to implement remote management of objects through the API. Object types to be registered must have a `uint64_t` field named 'handle'.
This commit is contained in:
14
src/nvim/api/private/handle.h
Normal file
14
src/nvim/api/private/handle.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef NVIM_API_HANDLE_H
|
||||
#define NVIM_API_HANDLE_H
|
||||
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#define HANDLE_DECLS(type, name) \
|
||||
type *handle_get_##name(uint64_t handle); \
|
||||
void handle_register_##name(type *name); \
|
||||
void handle_unregister_##name(type *name);
|
||||
|
||||
void handle_init(void);
|
||||
|
||||
#endif // NVIM_API_HANDLE_H
|
||||
|
Reference in New Issue
Block a user