mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
refactor(api): use arena for metadata; msgpack_rpc_to_object delenda est
Note: kSDItemHeader is something is _written_ by nvim in the shada file to identify it for debugging purposes outside of nvim. But this data wasn't ever used by neovim after reading the file back, So I removed the parsing of it for now.
This commit is contained in:
@@ -2550,21 +2550,21 @@ bool has_vim_patch(int n)
|
||||
return false;
|
||||
}
|
||||
|
||||
Dictionary version_dict(void)
|
||||
Dictionary version_dict(Arena *arena)
|
||||
{
|
||||
Dictionary d = ARRAY_DICT_INIT;
|
||||
PUT(d, "major", INTEGER_OBJ(NVIM_VERSION_MAJOR));
|
||||
PUT(d, "minor", INTEGER_OBJ(NVIM_VERSION_MINOR));
|
||||
PUT(d, "patch", INTEGER_OBJ(NVIM_VERSION_PATCH));
|
||||
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(d, "build", NIL);
|
||||
PUT_C(d, "build", NIL);
|
||||
#else
|
||||
PUT(d, "build", CSTR_AS_OBJ(NVIM_VERSION_BUILD));
|
||||
PUT_C(d, "build", STATIC_CSTR_AS_OBJ(NVIM_VERSION_BUILD));
|
||||
#endif
|
||||
PUT(d, "prerelease", BOOLEAN_OBJ(NVIM_VERSION_PRERELEASE[0] != '\0'));
|
||||
PUT(d, "api_level", INTEGER_OBJ(NVIM_API_LEVEL));
|
||||
PUT(d, "api_compatible", INTEGER_OBJ(NVIM_API_LEVEL_COMPAT));
|
||||
PUT(d, "api_prerelease", BOOLEAN_OBJ(NVIM_API_PRERELEASE));
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user