refactor(api): provide a temporary copy solution for nvim_call_atomic

Make the copy_object() family accept an optional arena. More than
half of the callsites should be refactored to use an arena later
anyway.
This commit is contained in:
bfredl
2022-08-23 13:52:09 +02:00
parent bcf5ee328e
commit 7784dc9e0d
17 changed files with 71 additions and 64 deletions

View File

@@ -903,7 +903,7 @@ Dictionary hlattrs2dict(Dictionary *hl_alloc, HlAttrs ae, bool use_rgb)
*hl_alloc = hl;
return hl;
} else {
Dictionary allocated = copy_dictionary(hl);
Dictionary allocated = copy_dictionary(hl, NULL);
kv_destroy(hl);
return allocated;
}