[libvirt] [libvirt-python 18/18] Bring some virTypedParams* API from libvirt

Eric Blake eblake at redhat.com
Tue Nov 19 16:28:35 UTC 2013


On 11/18/2013 03:44 PM, Doug Goldstein wrote:
> virTypedParamsClear() and virTypedParamsFree() were introduced in
> libvirt 1.0.2. In an effort to keep the code clean bring these two
> functions to libvirt-python if we're building against a version of
> libvirt that's older than 1.0.2
> ---
>  libvirt-utils.c | 43 +++++++++++++++++++++++++++++++++++++++++++
>  libvirt-utils.h |  6 ++++++
>  2 files changed, 49 insertions(+)
> 

> + * Returns nothing.
> + */
> +void
> +virTypedParamsClear(virTypedParameterPtr params,
> +                    int nparams)

Umm, where's the LIBVIR_CHECK_VERSION() to ensure that we don't compile
this when using a new enough libvirt.so?


> + *
> + * Frees all memory used by string parameters and the memory occuiped by

s/occuiped/occupied/ (upstream was correct, so not sure how you made
that mistake)

>  
> +# if ! LIBVIR_CHECK_VERSION(1,0,2)
> +void virTypedParamsClear(virTypedParameterPtr params, int nparams);
> +
> +void virTypedParamsFree(virTypedParameterPtr params, int nparams);
> +# endif /* ! LIBVIR_CHECK_VERSION(1,0,2) */

This part is okay, but the .c side also needs guards.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131119/12a70316/attachment-0001.sig>


More information about the libvir-list mailing list