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

@@ -1086,7 +1086,7 @@ void ex_messages(void *const eap_p)
HlMessageChunk chunk = kv_A(p->multiattr, i);
Array content_entry = ARRAY_DICT_INIT;
ADD(content_entry, INTEGER_OBJ(chunk.attr));
ADD(content_entry, STRING_OBJ(copy_string(chunk.text)));
ADD(content_entry, STRING_OBJ(copy_string(chunk.text, NULL)));
ADD(content, ARRAY_OBJ(content_entry));
}
} else if (p->msg && p->msg[0]) {