Re: [PATCHv3] python: Fix problems of virDomain{Set, Get}BlkioParameters bindings

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

 



On 02/10/2012 02:41 AM, ajia@xxxxxxxxxx wrote:
> From: Alex Jia <ajia@xxxxxxxxxx>
> 
> The parameter 'device_weight' is a string, however, the 'VIR_TYPED_PARAM_STRING'
> type condition is missed by libvirt_virDomain{Set, Get}BlkioParameters bindings,
> the result is we can't get or change 'device_weight' value.
> 
> The latest python binding codes are refactored and added related 'VIR_TYPED_PARAM_STRING'
> type argument process, the v3 patch follows latest codes change to resolve the above issue.
> 
> The v2 patch added missed 'VIR_TYPED_PARAM_STRING' condition into
> libvirt_virDomain{Set, Get}BlkioParameters bindings and free allocated memory.
> https://www.redhat.com/archives/libvir-list/2011-December/msg01122.html
> 
> RHBZ:https://bugzilla.redhat.com/show_bug.cgi?id=770795
> 
> Signed-off-by: Alex Jia <ajia@xxxxxxxxxx>
> ---
>  python/libvirt-override.c |  142 +++++++++++++--------------------------------
>  1 files changed, 40 insertions(+), 102 deletions(-)
> 
> diff --git a/python/libvirt-override.c b/python/libvirt-override.c
> index e7c2bd5..203ffa1 100644
> --- a/python/libvirt-override.c
> +++ b/python/libvirt-override.c
> @@ -889,10 +889,11 @@ libvirt_virDomainSetBlkioParameters(PyObject *self ATTRIBUTE_UNUSED,
>                                       PyObject *args) {
>      virDomainPtr domain;
>      PyObject *pyobj_domain, *info;
> +    PyObject *ret = NULL;
>      int i_retval;
> -    int nparams = 0, i;
> +    int nparams = 0, size = 0;

size should be Py_ssize_t.

ACK with that change.

-- 
Eric Blake   eblake@xxxxxxxxxx    +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]