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:
bfredl
2024-02-18 12:51:27 +01:00
parent 93c911e52f
commit bbf6d4a4bc
6 changed files with 71 additions and 312 deletions

View File

@@ -3629,10 +3629,9 @@ shada_read_next_item_start:
entry->data = sd_default_values[type_u64].data;
switch ((ShadaEntryType)type_u64) {
case kSDItemHeader:
if (!msgpack_rpc_to_dictionary(&(unpacked.data), &(entry->data.header))) {
semsg(_(READERR("header", "is not a dictionary")), initial_fpos);
goto shada_read_next_item_error;
}
// TODO(bfredl): header is written to file and provides useful debugging
// info. It is never read by nvim (earlier we parsed it back to a
// Dictionary, but that value was never used)
break;
case kSDItemSearchPattern: {
if (unpacked.data.type != MSGPACK_OBJECT_MAP) {