forked from aniani/vim
patch 9.1.0824: too many strlen() calls in register.c
Problem: too many strlen() calls in register.c Solution: refactor code, add string_T struct to keep track of string lengths (John Marriott) closes: #15952 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
a68bd6f089
commit
79f6ffd388
@@ -367,6 +367,15 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Free a string and set it's pointer to NULL and length to 0
|
||||
*/
|
||||
#define VIM_CLEAR_STRING(s) \
|
||||
do { \
|
||||
VIM_CLEAR(s.string); \
|
||||
s.length = 0; \
|
||||
} while (0)
|
||||
|
||||
// Whether a command index indicates a user command.
|
||||
#define IS_USER_CMDIDX(idx) ((int)(idx) < 0)
|
||||
|
||||
|
Reference in New Issue
Block a user