aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2023-04-06 22:39:50 +0200
committerGitHub <noreply@github.com>2023-04-06 22:39:50 +0200
commit7190dba017e3aac0409c73ff1c954d18858cb3c9 (patch)
tree321f4b2dd65e4a06047beee876d3c2e0d2dbf7d0 /src/nvim/regexp_nfa.c
parent0bc323850410df4c3c1dd8fabded9d2000189270 (diff)
downloadrneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.gz
rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.tar.bz2
rneovim-7190dba017e3aac0409c73ff1c954d18858cb3c9.zip
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.
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index b02c38fb6c..260d40a202 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -5252,9 +5252,9 @@ static regsubs_T *addstate_here(nfa_list_T *l, nfa_state_T *state, regsubs_T *su
}
// Check character class "class" against current character c.
-static int check_char_class(int class, int c)
+static int check_char_class(int cls, int c)
{
- switch (class) {
+ switch (cls) {
case NFA_CLASS_ALNUM:
if (c >= 1 && c < 128 && isalnum(c)) {
return OK;
@@ -5353,7 +5353,7 @@ static int check_char_class(int class, int c)
default:
// should not be here :P
- siemsg(_(e_ill_char_class), (int64_t)class);
+ siemsg(_(e_ill_char_class), (int64_t)cls);
return FAIL;
}
return FAIL;