[dpdk-dev] [PATCH v5 2/2] cmdline: make struct rdline opaque
Narcisa Ana Maria Vasile
navasile at linux.microsoft.com
Sat Oct 9 00:57:16 CEST 2021
On Fri, Oct 08, 2021 at 01:10:28AM +0300, Dmitry Kozlyuk wrote:
> 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 <dmitry.kozliuk at gmail.com>
> Acked-by: Olivier Matz <olivier.matz at 6wind.com>
> ---
Acked-by: Narcisa Vasile <navasile at linux.microsoft.com>
More information about the dev
mailing list