mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
refactor: replace char_u with char 18 (#21237)
refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -1052,8 +1052,8 @@ static int nlua_require(lua_State *const lstate)
|
||||
time_push(&rel_time, &start_time);
|
||||
int status = lua_pcall(lstate, 1, 1, 0);
|
||||
if (status == 0) {
|
||||
vim_snprintf((char *)IObuff, IOSIZE, "require('%s')", name);
|
||||
time_msg((char *)IObuff, &start_time);
|
||||
vim_snprintf(IObuff, IOSIZE, "require('%s')", name);
|
||||
time_msg(IObuff, &start_time);
|
||||
}
|
||||
time_pop(rel_time);
|
||||
|
||||
@@ -1342,7 +1342,7 @@ void nlua_typval_eval(const String str, typval_T *const arg, typval_T *const ret
|
||||
const size_t lcmd_len = sizeof(EVALHEADER) - 1 + str.size + 1;
|
||||
char *lcmd;
|
||||
if (lcmd_len < IOSIZE) {
|
||||
lcmd = (char *)IObuff;
|
||||
lcmd = IObuff;
|
||||
} else {
|
||||
lcmd = xmalloc(lcmd_len);
|
||||
}
|
||||
@@ -1352,7 +1352,7 @@ void nlua_typval_eval(const String str, typval_T *const arg, typval_T *const ret
|
||||
#undef EVALHEADER
|
||||
nlua_typval_exec(lcmd, lcmd_len, "luaeval()", arg, 1, true, ret_tv);
|
||||
|
||||
if (lcmd != (char *)IObuff) {
|
||||
if (lcmd != IObuff) {
|
||||
xfree(lcmd);
|
||||
}
|
||||
}
|
||||
@@ -1366,7 +1366,7 @@ void nlua_typval_call(const char *str, size_t len, typval_T *const args, int arg
|
||||
const size_t lcmd_len = sizeof(CALLHEADER) - 1 + len + sizeof(CALLSUFFIX) - 1;
|
||||
char *lcmd;
|
||||
if (lcmd_len < IOSIZE) {
|
||||
lcmd = (char *)IObuff;
|
||||
lcmd = IObuff;
|
||||
} else {
|
||||
lcmd = xmalloc(lcmd_len);
|
||||
}
|
||||
@@ -1379,7 +1379,7 @@ void nlua_typval_call(const char *str, size_t len, typval_T *const args, int arg
|
||||
|
||||
nlua_typval_exec(lcmd, lcmd_len, "v:lua", args, argcount, false, ret_tv);
|
||||
|
||||
if (lcmd != (char *)IObuff) {
|
||||
if (lcmd != IObuff) {
|
||||
xfree(lcmd);
|
||||
}
|
||||
}
|
||||
@@ -1645,7 +1645,7 @@ void ex_luado(exarg_T *const eap)
|
||||
+ (sizeof(DOEND) - 1));
|
||||
char *lcmd;
|
||||
if (lcmd_len < IOSIZE) {
|
||||
lcmd = (char *)IObuff;
|
||||
lcmd = IObuff;
|
||||
} else {
|
||||
lcmd = xmalloc(lcmd_len + 1);
|
||||
}
|
||||
|
@@ -182,19 +182,19 @@ int tslua_add_language(lua_State *L)
|
||||
|
||||
uv_lib_t lib;
|
||||
if (uv_dlopen(path, &lib)) {
|
||||
snprintf((char *)IObuff, IOSIZE, "Failed to load parser: uv_dlopen: %s",
|
||||
snprintf(IObuff, IOSIZE, "Failed to load parser: uv_dlopen: %s",
|
||||
uv_dlerror(&lib));
|
||||
uv_dlclose(&lib);
|
||||
lua_pushstring(L, (char *)IObuff);
|
||||
lua_pushstring(L, IObuff);
|
||||
return lua_error(L);
|
||||
}
|
||||
|
||||
TSLanguage *(*lang_parser)(void);
|
||||
if (uv_dlsym(&lib, symbol_buf, (void **)&lang_parser)) {
|
||||
snprintf((char *)IObuff, IOSIZE, "Failed to load parser: uv_dlsym: %s",
|
||||
snprintf(IObuff, IOSIZE, "Failed to load parser: uv_dlsym: %s",
|
||||
uv_dlerror(&lib));
|
||||
uv_dlclose(&lib);
|
||||
lua_pushstring(L, (char *)IObuff);
|
||||
lua_pushstring(L, IObuff);
|
||||
return lua_error(L);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user