Re: [python PATCH 2/3] Fix parsing of 'flags' argument for bulk stats functions

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

 



On 10/21/2014 08:34 AM, Peter Krempa wrote:
> From: Luyao Huang <lhuang@xxxxxxxxxx>
> 
> When 'flags' is set to
> 'libvirt.VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS,
> python will report a  error:
> 
> OverflowError: signed integer is greater than maximum
> 
> as VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS is defined as 1<<31.
> This happens as PyArg_ParseTuple's formatting string containing 'i' as a
> modifier expects a signed integer.
> 
> With python >= 2.3, 'I' means unsigned int and 'i' means int so we
> should use 'I' in the formatting string.
> 
> See: https://docs.python.org/2/c-api/arg.html
> 
> Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
> Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
> ---
>  libvirt-override.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

ACK

-- 
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]