| 6ad06203 | 18-Oct-2021 |
Zhihong Peng <[email protected]> |
cmdline: free on exit
Malloc cl in the cmdline_stdin_new function, so release in the cmdline_stdin_exit function is logical, so that cl will not be released alone.
Fixes: af75078fece3 ("first publi
cmdline: free on exit
Malloc cl in the cmdline_stdin_new function, so release in the cmdline_stdin_exit function is logical, so that cl will not be released alone.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Zhihong Peng <[email protected]> Reviewed-by: Dmitry Kozlyuk <[email protected]> Acked-by: Olivier Matz <[email protected]> Tested-by: Zhihong Peng <[email protected]>
show more ...
|
| f8f8dc28 | 07-Oct-2021 |
Dmitry Kozlyuk <[email protected]> |
cmdline: make struct rdline opaque
Hide struct rdline definition and some RDLINE_* constants in order to be able to change internal buffer sizes transparently to the user. Add new functions:
* rdli
cmdline: make struct rdline opaque
Hide struct rdline definition and some RDLINE_* constants in order to be able to change internal buffer sizes transparently to the user. Add new functions:
* rdline_new(): allocate and initialize struct rdline. This function replaces rdline_init() and takes an extra parameter: opaque user data for the callbacks. * rdline_free(): deallocate struct rdline. * rdline_get_history_buffer_size(): for use in tests. * rdline_get_opaque(): to obtain user data in callback functions.
Remove rdline_init() function from library headers and export list, because using it requires the knowledge of sizeof(struct rdline).
Signed-off-by: Dmitry Kozlyuk <[email protected]> Acked-by: Olivier Matz <[email protected]> Acked-by: Narcisa Vasile <[email protected]>
show more ...
|