mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
refactor: remove use of reserved c++ keywords
libnvim couldn't be easily used in C++ due to the use of reserved keywords. Additionally, add explicit casts to *alloc function calls used in inline functions, as C++ doesn't allow implicit casts from void pointers.
This commit is contained in:
@@ -939,10 +939,10 @@ void do_autocmd(exarg_T *eap, char *arg_in, int forceit)
|
||||
xfree(envpat);
|
||||
}
|
||||
|
||||
void do_all_autocmd_events(char *pat, bool once, int nested, char *cmd, bool delete, int group)
|
||||
void do_all_autocmd_events(char *pat, bool once, int nested, char *cmd, bool del, int group)
|
||||
{
|
||||
FOR_ALL_AUEVENTS(event) {
|
||||
if (do_autocmd_event(event, pat, once, nested, cmd, delete, group)
|
||||
if (do_autocmd_event(event, pat, once, nested, cmd, del, group)
|
||||
== FAIL) {
|
||||
return;
|
||||
}
|
||||
@@ -956,12 +956,12 @@ void do_all_autocmd_events(char *pat, bool once, int nested, char *cmd, bool del
|
||||
// If *cmd == NUL: show entries.
|
||||
// If forceit == true: delete entries.
|
||||
// If group is not AUGROUP_ALL: only use this group.
|
||||
int do_autocmd_event(event_T event, char *pat, bool once, int nested, char *cmd, bool delete,
|
||||
int do_autocmd_event(event_T event, char *pat, bool once, int nested, char *cmd, bool del,
|
||||
int group)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
// Cannot be used to show all patterns. See au_show_for_event or au_show_for_all_events
|
||||
assert(*pat != NUL || delete);
|
||||
assert(*pat != NUL || del);
|
||||
|
||||
AutoPat *ap;
|
||||
AutoPat **prev_ap;
|
||||
@@ -978,7 +978,7 @@ int do_autocmd_event(event_T event, char *pat, bool once, int nested, char *cmd,
|
||||
}
|
||||
|
||||
// Delete all aupat for an event.
|
||||
if (*pat == NUL && delete) {
|
||||
if (*pat == NUL && del) {
|
||||
aupat_del_for_event_and_group(event, findgroup);
|
||||
return OK;
|
||||
}
|
||||
@@ -999,7 +999,7 @@ int do_autocmd_event(event_T event, char *pat, bool once, int nested, char *cmd,
|
||||
patlen = (int)strlen(buflocal_pat);
|
||||
}
|
||||
|
||||
if (delete) {
|
||||
if (del) {
|
||||
assert(*pat != NUL);
|
||||
|
||||
// Find AutoPat entries with this pattern.
|
||||
|
Reference in New Issue
Block a user