diff options
Diffstat (limited to 'src/nvim/lua')
-rw-r--r-- | src/nvim/lua/converter.c | 8 | ||||
-rw-r--r-- | src/nvim/lua/stdlib.c | 2 | ||||
-rw-r--r-- | src/nvim/lua/treesitter.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c index 49d49f76b9..21dd5139d7 100644 --- a/src/nvim/lua/converter.c +++ b/src/nvim/lua/converter.c @@ -388,12 +388,12 @@ nlua_pop_typval_table_processing_end: LuaCFunctionState *state = xmalloc(sizeof(LuaCFunctionState)); state->lua_callable.func_ref = nlua_ref_global(lstate, -1); - char_u *name = register_cfunc(&nlua_CFunction_func_call, - &nlua_CFunction_func_free, - state); + char *name = (char *)register_cfunc(&nlua_CFunction_func_call, + &nlua_CFunction_func_free, + state); cur.tv->v_type = VAR_FUNC; - cur.tv->vval.v_string = (char *)vim_strsave(name); + cur.tv->vval.v_string = xstrdup(name); break; } case LUA_TUSERDATA: { diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c index 1b874e673a..e3d6a7eec8 100644 --- a/src/nvim/lua/stdlib.c +++ b/src/nvim/lua/stdlib.c @@ -111,7 +111,7 @@ static int regex_match_line(lua_State *lstate) return luaL_error(lstate, "invalid row"); } - char_u *line = ml_get_buf(buf, rownr + 1, false); + char_u *line = (char_u *)ml_get_buf(buf, rownr + 1, false); size_t len = STRLEN(line); if (start < 0 || (size_t)start > len) { diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c index 65e024b707..971a47f8c9 100644 --- a/src/nvim/lua/treesitter.c +++ b/src/nvim/lua/treesitter.c @@ -332,7 +332,7 @@ static const char *input_cb(void *payload, uint32_t byte_index, TSPoint position *bytes_read = 0; return ""; } - char *line = (char *)ml_get_buf(bp, (linenr_T)position.row + 1, false); + char *line = ml_get_buf(bp, (linenr_T)position.row + 1, false); size_t len = STRLEN(line); if (position.column > len) { *bytes_read = 0; |