mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
refactor(api): make cstr_as_string accept "const char*"
In the context a String inside an Object/Dictionary etc is consumed, it is considered to be read-only.
This commit is contained in:
@@ -229,7 +229,7 @@ void ui_refresh(void)
|
||||
}
|
||||
ui_ext[i] = ext_widgets[i];
|
||||
if (i < kUIGlobalCount) {
|
||||
ui_call_option_set(cstr_as_string((char *)ui_ext_names[i]),
|
||||
ui_call_option_set(cstr_as_string(ui_ext_names[i]),
|
||||
BOOLEAN_OBJ(ext_widgets[i]));
|
||||
}
|
||||
}
|
||||
@@ -451,8 +451,7 @@ void ui_set_ext_option(UI *ui, UIExtension ext, bool active)
|
||||
return;
|
||||
}
|
||||
if (ui_ext_names[ext][0] != '_' || active) {
|
||||
remote_ui_option_set(ui, cstr_as_string((char *)ui_ext_names[ext]),
|
||||
BOOLEAN_OBJ(active));
|
||||
remote_ui_option_set(ui, cstr_as_string(ui_ext_names[ext]), BOOLEAN_OBJ(active));
|
||||
}
|
||||
if (ext == kUITermColors) {
|
||||
ui_default_colors_set();
|
||||
|
Reference in New Issue
Block a user