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.
This commit is contained in:
bfredl
2022-05-30 00:59:06 +02:00
parent e9803e1de6
commit 1f63052b68
10 changed files with 65 additions and 79 deletions

View File

@@ -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"