Re: [libvirt] [PATCH] python: make virDomainSetSchedulerParameters accpet integer argument

2012-03-20 Thread Guannan Ren
On 03/20/2012 02:11 AM, Eric Blake wrote: On 03/19/2012 12:03 PM, Eric Blake wrote: Why are you doing this for just VIR_TYPED_PARAM_ULLONG? I argue that we should be doing it for all of the integral conversions. In fact, I'd argue that we want new helper functions in typewrappers.c, as counte

Re: [libvirt] [PATCH] python: make virDomainSetSchedulerParameters accpet integer argument

2012-03-19 Thread Eric Blake
On 03/19/2012 12:03 PM, Eric Blake wrote: > > Why are you doing this for just VIR_TYPED_PARAM_ULLONG? I argue that we > should be doing it for all of the integral conversions. In fact, I'd argue that we want new helper functions in typewrappers.c, as counterparts to our libvirt_intWrap() and fr

Re: [libvirt] [PATCH] python: make virDomainSetSchedulerParameters accpet integer argument

2012-03-19 Thread Eric Blake
On 03/19/2012 11:45 AM, Guannan Ren wrote: > When sending a Python integer as an argument to > PyLong_AsUnsignedLong or PyLong_AsUnsignedLongLong, > the following error occurs > > SystemError: Objects/longobject.c:980: > bad argument to internal function > > +++ b/python/libv

[libvirt] [PATCH] python: make virDomainSetSchedulerParameters accpet integer argument

2012-03-19 Thread Guannan Ren
When sending a Python integer as an argument to PyLong_AsUnsignedLong or PyLong_AsUnsignedLongLong, the following error occurs SystemError: Objects/longobject.c:980: bad argument to internal function This error comes from the fact that PyLong_AsUnsignedLong and PyLong_