refactor: rename mch_msg => os_msg

This commit is contained in:
Justin M. Keyes
2022-12-16 17:33:52 +01:00
parent b55ccb4324
commit 614d382621
8 changed files with 104 additions and 104 deletions

View File

@@ -205,8 +205,8 @@ static int nlua_luv_cfpcall(lua_State *lstate, int nargs, int nresult, int flags
if (status) {
if (status == LUA_ERRMEM && !(flags & LUVF_CALLBACK_NOEXIT)) {
// consider out of memory errors unrecoverable, just like xmalloc()
mch_errmsg(e_outofmem);
mch_errmsg("\n");
os_errmsg(e_outofmem);
os_errmsg("\n");
preserve_exit();
}
const char *error = lua_tostring(lstate, -1);
@@ -258,8 +258,8 @@ static int nlua_luv_thread_common_cfpcall(lua_State *lstate, int nargs, int nres
if (status == LUA_ERRMEM && !(flags & LUVF_CALLBACK_NOEXIT)) {
// Terminate this thread, as the main thread may be able to continue
// execution.
mch_errmsg(e_outofmem);
mch_errmsg("\n");
os_errmsg(e_outofmem);
os_errmsg("\n");
lua_close(lstate);
#ifdef MSWIN
ExitThread(0);
@@ -598,8 +598,8 @@ static bool nlua_init_packages(lua_State *lstate)
lua_getglobal(lstate, "require");
lua_pushstring(lstate, "vim._init_packages");
if (nlua_pcall(lstate, 1, 0)) {
mch_errmsg((char *)lua_tostring(lstate, -1));
mch_errmsg("\n");
os_errmsg((char *)lua_tostring(lstate, -1));
os_errmsg("\n");
return false;
}
@@ -779,12 +779,12 @@ void nlua_init(void)
lua_State *lstate = luaL_newstate();
if (lstate == NULL) {
mch_errmsg(_("E970: Failed to initialize lua interpreter\n"));
os_errmsg(_("E970: Failed to initialize lua interpreter\n"));
os_exit(1);
}
luaL_openlibs(lstate);
if (!nlua_state_init(lstate)) {
mch_errmsg(_("E970: Failed to initialize builtin lua modules\n"));
os_errmsg(_("E970: Failed to initialize builtin lua modules\n"));
os_exit(1);
}