mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
refactor(metadata): generate all metadata in lua
Then we can just load metadata in C as a single msgpack blob. Which also can be used directly as binarly data, instead of first unpacking all the functions and ui_events metadata to immediately pack it again, which was a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object` which will get yak shaved in the next PR)
This commit is contained in:
@@ -2550,24 +2550,6 @@ bool has_vim_patch(int n)
|
||||
return false;
|
||||
}
|
||||
|
||||
Dictionary version_dict(Arena *arena)
|
||||
{
|
||||
Dictionary d = arena_dict(arena, 8);
|
||||
PUT_C(d, "major", INTEGER_OBJ(NVIM_VERSION_MAJOR));
|
||||
PUT_C(d, "minor", INTEGER_OBJ(NVIM_VERSION_MINOR));
|
||||
PUT_C(d, "patch", INTEGER_OBJ(NVIM_VERSION_PATCH));
|
||||
#ifndef NVIM_VERSION_BUILD
|
||||
PUT_C(d, "build", NIL);
|
||||
#else
|
||||
PUT_C(d, "build", STATIC_CSTR_AS_OBJ(NVIM_VERSION_BUILD));
|
||||
#endif
|
||||
PUT_C(d, "prerelease", BOOLEAN_OBJ(NVIM_VERSION_PRERELEASE[0] != '\0'));
|
||||
PUT_C(d, "api_level", INTEGER_OBJ(NVIM_API_LEVEL));
|
||||
PUT_C(d, "api_compatible", INTEGER_OBJ(NVIM_API_LEVEL_COMPAT));
|
||||
PUT_C(d, "api_prerelease", BOOLEAN_OBJ(NVIM_API_PRERELEASE));
|
||||
return d;
|
||||
}
|
||||
|
||||
void ex_version(exarg_T *eap)
|
||||
{
|
||||
// Ignore a ":version 9.99" command.
|
||||
|
Reference in New Issue
Block a user