mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
Introduce GA_APPEND()
This macro is used to append an element to a growable array. It replaces this common idiom: ga_grow(&ga, 1); ((item_type *)ga.ga_data)[ga.ga_len] = item; ++ga.ga_len;
This commit is contained in:

committed by
Justin M. Keyes

parent
be3a4b6ca8
commit
45e7814e6a
@@ -1963,9 +1963,7 @@ syn_current_attr (
|
||||
/* Add the index to a list, so that we can check
|
||||
* later that we don't match it again (and cause an
|
||||
* endless loop). */
|
||||
ga_grow(&zero_width_next_ga, 1);
|
||||
((int *)(zero_width_next_ga.ga_data))
|
||||
[zero_width_next_ga.ga_len++] = next_match_idx;
|
||||
GA_APPEND(int, &zero_width_next_ga, next_match_idx);
|
||||
next_match_idx = -1;
|
||||
} else
|
||||
cur_si = push_next_match(cur_si);
|
||||
|
Reference in New Issue
Block a user