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:
bfredl
2024-02-09 11:42:40 +01:00
parent 4788abf2da
commit e0e5b7f0ba
16 changed files with 29 additions and 30 deletions

View File

@@ -135,7 +135,7 @@ void ui_send_all_hls(UI *ui)
api_free_array(inspect);
}
for (size_t hlf = 0; hlf < HLF_COUNT; hlf++) {
remote_ui_hl_group_set(ui, cstr_as_string((char *)hlf_names[hlf]),
remote_ui_hl_group_set(ui, cstr_as_string(hlf_names[hlf]),
highlight_attr[hlf]);
}
}