[PATCH v3 10/25] util: virtypedparam: Introduce 'virTypedParamListFetch'

Ján Tomko jtomko at redhat.com
Wed Apr 19 13:14:16 UTC 2023


On a Wednesday in 2023, Peter Krempa wrote:
>Introduce a helper that fetches the typed parameters from the list while
>still preserving ownership of the pointer by the list.
>
>In the future this will be also able to report errors stored in the
>list.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com
>---
> src/libvirt_private.syms |  1 +
> src/util/virtypedparam.c | 26 ++++++++++++++++++++++++++
> src/util/virtypedparam.h |  6 ++++++
> 3 files changed, 33 insertions(+)
>
>diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c
>index f8dce9ed98..6e837c65bc 100644
>--- a/src/util/virtypedparam.c
>+++ b/src/util/virtypedparam.c
>@@ -747,6 +747,32 @@ virTypedParamListFree(virTypedParamList *list)
> }
>
>
>+/**
>+ * virTypedParamListFetch:
>+ *
>+ * @list: virTypedParamList object
>+ * @par: if not NULL filled with the typed parameters stored in @list
>+ * @npar: if not NULL filled with the number of typed parameters stored in @list
>+ *
>+ * Checks that @list has no errors stored and optionally fills @par and @npar
>+ * with a valid list of typed parametes. The typed parameters still belong to

*parameters

>+ * @list and will be freed together.
>+ */

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230419/9b2a24cb/attachment.sig>


More information about the libvir-list mailing list