
On 02/10/2012 02:41 AM, ajia@redhat.com wrote:
From: Alex Jia <ajia@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@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@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org