aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/api')
-rw-r--r--src/nvim/api/private/handle.c5
-rw-r--r--src/nvim/api/private/handle.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/api/private/handle.c b/src/nvim/api/private/handle.c
index 3bf519bc58..97f5cd88b5 100644
--- a/src/nvim/api/private/handle.c
+++ b/src/nvim/api/private/handle.c
@@ -26,6 +26,11 @@
map_del(uint64_t)(name##_handles, name->handle); \
}
+static uint64_t next_handle = 1;
+
+HANDLE_IMPL(buf_T, buffer)
+
void handle_init()
{
+ HANDLE_INIT(buffer);
}
diff --git a/src/nvim/api/private/handle.h b/src/nvim/api/private/handle.h
index b9ed507ce9..846b20dff2 100644
--- a/src/nvim/api/private/handle.h
+++ b/src/nvim/api/private/handle.h
@@ -2,13 +2,17 @@
#define NVIM_API_HANDLE_H
#include "nvim/vim.h"
+#include "nvim/buffer_defs.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);
+HANDLE_DECLS(buf_T, buffer)
+
void handle_init(void);
+
#endif // NVIM_API_HANDLE_H