diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-08-26 23:11:25 +0200 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2022-11-26 15:52:21 +0100 |
commit | bd22585061b66d7f71d4832b4a81e950b3c9d19d (patch) | |
tree | 8c677ace61ab212cef87bc5abbd83c56e50f800d /src/nvim/debugger.c | |
parent | 29b80f6f2e9391b5d78390f65d09f00f73829310 (diff) | |
download | rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.tar.gz rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.tar.bz2 rneovim-bd22585061b66d7f71d4832b4a81e950b3c9d19d.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/debugger.c')
-rw-r--r-- | src/nvim/debugger.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/debugger.c b/src/nvim/debugger.c index 6f7d6a27ef..aa9e2a9a82 100644 --- a/src/nvim/debugger.c +++ b/src/nvim/debugger.c @@ -742,7 +742,7 @@ void ex_breaklist(exarg_T *eap) /// @param after after this line number linenr_T dbg_find_breakpoint(bool file, char *fname, linenr_T after) { - return debuggy_find(file, (char_u *)fname, after, &dbg_breakp, NULL); + return debuggy_find(file, fname, after, &dbg_breakp, NULL); } /// @param file true for a file, false for a function @@ -752,7 +752,7 @@ linenr_T dbg_find_breakpoint(bool file, char *fname, linenr_T after) /// @returns true if profiling is on for a function or sourced file. bool has_profiling(bool file, char *fname, bool *fp) { - return debuggy_find(file, (char_u *)fname, (linenr_T)0, &prof_ga, fp) + return debuggy_find(file, fname, (linenr_T)0, &prof_ga, fp) != (linenr_T)0; } @@ -763,11 +763,11 @@ bool has_profiling(bool file, char *fname, bool *fp) /// @param after after this line number /// @param gap either &dbg_breakp or &prof_ga /// @param fp if not NULL: return forceit -static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T *gap, bool *fp) +static linenr_T debuggy_find(bool file, char *fname, linenr_T after, garray_T *gap, bool *fp) { struct debuggy *bp; linenr_T lnum = 0; - char_u *name = fname; + char *name = fname; int prev_got_int; // Return quickly when there are no breakpoints. @@ -776,8 +776,8 @@ static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T } // Replace K_SNR in function name with "<SNR>". - if (!file && fname[0] == K_SPECIAL) { - name = xmalloc(STRLEN(fname) + 3); + if (!file && (uint8_t)fname[0] == K_SPECIAL) { + name = xmalloc(strlen(fname) + 3); STRCPY(name, "<SNR>"); STRCPY(name + 5, fname + 3); } @@ -795,7 +795,7 @@ static linenr_T debuggy_find(bool file, char_u *fname, linenr_T after, garray_T // while matching should abort it. prev_got_int = got_int; got_int = false; - if (vim_regexec_prog(&bp->dbg_prog, false, name, (colnr_T)0)) { + if (vim_regexec_prog(&bp->dbg_prog, false, (char_u *)name, (colnr_T)0)) { lnum = bp->dbg_lnum; if (fp != NULL) { *fp = bp->dbg_forceit; |