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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]