mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
refactor(eval): use arena when converting typvals to Object
Note: this contains two _temporary_ changes which can be reverted once the Arena vs no-Arena distinction in API wrappers has been removed. Both nlua_push_Object and object_to_vim_take_luaref() has been changed to take the object argument as a pointer. This is not going to be necessary once these are only used with arena (or not at all) allocated Objects. The object_to_vim() variant which leaves luaref untouched might need to stay for a little longer.
This commit is contained in:
@@ -343,7 +343,6 @@ void terminal_open(Terminal **termpp, buf_T *buf, TerminalOptions opts)
|
||||
if (name) {
|
||||
int dummy;
|
||||
RgbValue color_val = name_to_color(name, &dummy);
|
||||
xfree(name);
|
||||
|
||||
if (color_val != -1) {
|
||||
VTermColor color;
|
||||
@@ -1003,6 +1002,7 @@ static void buf_set_term_title(buf_T *buf, const char *title, size_t len)
|
||||
STRING_OBJ(((String){ .data = (char *)title, .size = len })),
|
||||
false,
|
||||
false,
|
||||
NULL,
|
||||
&err);
|
||||
api_clear_error(&err);
|
||||
status_redraw_buf(buf);
|
||||
@@ -1883,10 +1883,10 @@ static char *get_config_string(char *key)
|
||||
{
|
||||
Error err = ERROR_INIT;
|
||||
// Only called from terminal_open where curbuf->terminal is the context.
|
||||
Object obj = dict_get_value(curbuf->b_vars, cstr_as_string(key), &err);
|
||||
Object obj = dict_get_value(curbuf->b_vars, cstr_as_string(key), NULL, &err);
|
||||
api_clear_error(&err);
|
||||
if (obj.type == kObjectTypeNil) {
|
||||
obj = dict_get_value(&globvardict, cstr_as_string(key), &err);
|
||||
obj = dict_get_value(&globvardict, cstr_as_string(key), NULL, &err);
|
||||
api_clear_error(&err);
|
||||
}
|
||||
if (obj.type == kObjectTypeString) {
|
||||
|
Reference in New Issue
Block a user