[libvirt] [python PATCH 2/3] Fix parsing of 'flags' argument for bulk stats functions
Eric Blake
eblake at redhat.com
Tue Oct 21 18:03:04 UTC 2014
On 10/21/2014 08:34 AM, Peter Krempa wrote:
> From: Luyao Huang <lhuang at redhat.com>
>
> 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 at redhat.com>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141021/45d24909/attachment-0001.sig>
More information about the libvir-list
mailing list