mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
patch 9.1.0138: too many STRLEN calls when getting a memline
Problem: too many STRLEN calls when getting a memline
Solution: Optimize calls to STRLEN(), add a few functions in memline.c
that return the byte length instead of relying on STRLEN()
(John Marriott)
closes: #14052
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
2c51e15b66
commit
02d7a6c6cf
@@ -19,6 +19,10 @@ char_u *ml_get(linenr_T lnum);
|
||||
char_u *ml_get_pos(pos_T *pos);
|
||||
char_u *ml_get_curline(void);
|
||||
char_u *ml_get_cursor(void);
|
||||
colnr_T ml_get_len(linenr_T lnum);
|
||||
colnr_T ml_get_curline_len(void);
|
||||
colnr_T ml_get_cursor_len(void);
|
||||
colnr_T ml_get_buf_len(buf_T *buf, linenr_T lnum);
|
||||
char_u *ml_get_buf(buf_T *buf, linenr_T lnum, int will_change);
|
||||
int ml_line_alloced(void);
|
||||
int ml_append(linenr_T lnum, char_u *line, colnr_T len, int newfile);
|
||||
|
||||
Reference in New Issue
Block a user