On 08/26/2014 11:39 AM, Peter Krempa wrote:
On 08/26/14 16:43, Ján Tomko wrote:
> ---
> generator.py | 1 +
> libvirt-override-api.xml | 7 +++++++
> libvirt-override.c | 37 +++++++++++++++++++++++++++++++++++++
> 3 files changed, 45 insertions(+)
>
> + py_retval = PyList_New(1);
> + PyList_SetItem(py_retval, 0, libvirt_intWrap(fd));
Wow, that's a bit superfluous. Just return the wrapped integer.
Also I'm not sure whether we shouldn't return a wrapped FD instead of
just the FD. I'd probably like to hear another opinion as I'm not a
python bindings master.
I agree - just return the int. Not just here in python, but also in the
C code. Patch to C code coming up.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org