aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_defs.h
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-03-04 13:10:00 +0100
committerGitHub <noreply@github.com>2023-03-04 20:10:00 +0800
commit6cab36e5b7b0d741abe6c5a7c0e20bad30361034 (patch)
tree8f00dab70b4a63ff572600a6e4824f59b0ae29c6 /src/nvim/regexp_defs.h
parenta4f443994bb91321b00f29af9e6357df9102ce75 (diff)
downloadrneovim-6cab36e5b7b0d741abe6c5a7c0e20bad30361034.tar.gz
rneovim-6cab36e5b7b0d741abe6c5a7c0e20bad30361034.tar.bz2
rneovim-6cab36e5b7b0d741abe6c5a7c0e20bad30361034.zip
refactor: replace char_u with char or uint8_t (#22400)
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/regexp_defs.h')
-rw-r--r--src/nvim/regexp_defs.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/regexp_defs.h b/src/nvim/regexp_defs.h
index b27a5b5942..ef155e8d46 100644
--- a/src/nvim/regexp_defs.h
+++ b/src/nvim/regexp_defs.h
@@ -98,11 +98,11 @@ typedef struct {
bool re_in_use;
int regstart;
- char_u reganch;
- char_u *regmust;
+ uint8_t reganch;
+ uint8_t *regmust;
int regmlen;
- char_u reghasz;
- char_u program[];
+ uint8_t reghasz;
+ uint8_t program[];
} bt_regprog_T;
// Structure representing a NFA state.
@@ -130,7 +130,7 @@ typedef struct {
int reganch; // pattern starts with ^
int regstart; // char at start of pattern
- char_u *match_text; // plain text to match with
+ uint8_t *match_text; // plain text to match with
int has_zend; // pattern contains \ze
int has_backref; // pattern contains \1 .. \9
@@ -158,19 +158,19 @@ typedef struct {
// from 1 to zero the matches need to be freed.
struct reg_extmatch {
int16_t refcnt;
- char_u *matches[NSUBEXP];
+ uint8_t *matches[NSUBEXP];
};
struct regengine {
/// bt_regcomp or nfa_regcomp
- regprog_T *(*regcomp)(char_u *, int);
+ regprog_T *(*regcomp)(uint8_t *, int);
/// bt_regfree or nfa_regfree
void (*regfree)(regprog_T *);
/// bt_regexec_nl or nfa_regexec_nl
- int (*regexec_nl)(regmatch_T *, char_u *, colnr_T, bool);
+ int (*regexec_nl)(regmatch_T *, uint8_t *, colnr_T, bool);
/// bt_regexec_mult or nfa_regexec_mult
long (*regexec_multi)(regmmatch_T *, win_T *, buf_T *, linenr_T, colnr_T, proftime_T *, int *);
- // char_u *expr;
+ // uint8_t *expr;
};
// Flags used by vim_regsub() and vim_regsub_both()