mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
Remove alloc_clear
Use `xcalloc` instead. Inline `alloc_tv` and `alloc_string_tv` in eval.c
This commit is contained in:

committed by
Thiago de Arruda

parent
c70a526a5d
commit
4e1b364a3e
@@ -2125,7 +2125,7 @@ ins_compl_add (
|
||||
* Allocate a new match structure.
|
||||
* Copy the values to the new match structure.
|
||||
*/
|
||||
match = (compl_T *)alloc_clear((unsigned)sizeof(compl_T));
|
||||
match = xcalloc(1, sizeof(compl_T));
|
||||
match->cp_number = -1;
|
||||
if (flags & ORIGINAL_TEXT)
|
||||
match->cp_number = 0;
|
||||
@@ -2460,9 +2460,9 @@ void ins_compl_show_pum(void)
|
||||
} while (compl != NULL && compl != compl_first_match);
|
||||
if (compl_match_arraysize == 0)
|
||||
return;
|
||||
compl_match_array = (pumitem_T *)alloc_clear(
|
||||
(unsigned)(sizeof(pumitem_T)
|
||||
* compl_match_arraysize));
|
||||
|
||||
assert(compl_match_arraysize >= 0);
|
||||
compl_match_array = xcalloc(compl_match_arraysize, sizeof(pumitem_T));
|
||||
/* If the current match is the original text don't find the first
|
||||
* match after it, don't highlight anything. */
|
||||
if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
|
||||
|
Reference in New Issue
Block a user