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

Eric Blake eblake at redhat.com
Sat Feb 11 00:10:22 UTC 2012


On 02/10/2012 02:41 AM, ajia at redhat.com wrote:
> From: Alex Jia <ajia at redhat.com>
> 
> 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 at redhat.com>
> ---
>  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 at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120210/9ba525bc/attachment-0001.sig>


More information about the libvir-list mailing list