mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 23:38:17 +00:00
refactor: rename mch_msg => os_msg
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user