aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_client.h
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-05-30 00:59:06 +0200
committerbfredl <bjorn.linse@gmail.com>2022-05-30 14:11:01 +0200
commit1f63052b682a6019d7f092553747272195fbfffd (patch)
treebf1d011b37bc1e61e75c6d8859c830e09d5c0285 /src/nvim/ui_client.h
parente9803e1de6497ee21f77f45cf2670c2fe4e8ab22 (diff)
downloadrneovim-1f63052b682a6019d7f092553747272195fbfffd.tar.gz
rneovim-1f63052b682a6019d7f092553747272195fbfffd.tar.bz2
rneovim-1f63052b682a6019d7f092553747272195fbfffd.zip
refactor(api): use hashy hash for looking up api method and event names
This avoids generating khash tables at runtime, and is consistent with how evalfuncs lookup work.
Diffstat (limited to 'src/nvim/ui_client.h')
-rw-r--r--src/nvim/ui_client.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/ui_client.h b/src/nvim/ui_client.h
index d31341ae60..41d9fa6227 100644
--- a/src/nvim/ui_client.h
+++ b/src/nvim/ui_client.h
@@ -3,7 +3,10 @@
#include "nvim/api/private/defs.h"
-typedef void (*UIClientHandler)(Array args);
+typedef struct {
+ const char *name;
+ void (*fn)(Array args);
+} UIClientHandler;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui_client.h.generated.h"