diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-21 21:36:58 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-21 21:36:58 +0100 |
commit | 00eb23b47aa79461b913b320eba3c95b90e6eec4 (patch) | |
tree | ebeb54dcc6eb977247f5088be9cffc4deaea27e9 /include | |
parent | e4202df0918e13130bb511a4ce372cbbe089068d (diff) | |
download | busybox-00eb23b47aa79461b913b320eba3c95b90e6eec4.tar.gz |
bc: do not allocate line editing state until needed
function old new delta
xc_read_line 324 353 +29
free_line_input_t 34 39 +5
xc_vm_init 656 640 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-16) Total: 18 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 1c3d905b6..cae54658b 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1906,7 +1906,11 @@ enum { FOR_SHELL = DO_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, }; line_input_t *new_line_input_t(int flags) FAST_FUNC; +#if ENABLE_FEATURE_EDITING_SAVEHISTORY void free_line_input_t(line_input_t *n) FAST_FUNC; +#else +# define free_line_input_t(n) free(n) +#endif /* * maxsize must be >= 2. * Returns: |