[libvirt] [PATCH] fix python events

David Lively dlively at virtualiron.com
Fri Nov 21 14:11:12 UTC 2008


Doh! ... attached :-)


On Fri, 2008-11-21 at 10:30 +0100, Jim Meyering wrote:
> David Lively <dlively at virtualiron.com> wrote:
> > This patch gets python events working again after upstream changes, and
> > make the test implementation properly clean up after itself and
> > implement the new EventImpl API properly.
> >
> > Note that the Python RemoveHandle and RemoveTimeout implementations
> > should return the opaque object registered by the corresponding
> > AddHandle/Timeout calls, in lieu of calling the (C) freefunc.  (The
> > binding code will then call freefunc if it's not NULL.)  Ignoring this
> > means you'll leak memory in the same way that C RemoveHandle/Timeout
> > leak if they don't (now) call the freefunc.
> >
> > I also moved around some of the error checking code to unclutter (and
> > speed up) the common code paths.  For instance, we now check that the
> > virRegisterEventImpl arguments are callable just once (and return
> > failure if they're not), rather than checking them before every call and
> > blithely ignoring them if they're not callable.
> >
> > Dave
> >
> >  examples/domain-events/events-python/event-test.py |   29 +--
> >  python/libvir.c                                    |  200+++++++++++++++----
> >  python/libvir.py                                   |    4
> >  python/libvirt_wrap.h                              |    8
> >  python/types.c                                     |    1
> >  python/virConnect.py                               |    4
> >  6 files changed, 194 insertions(+), 52 deletions(-)
> 
> Hi Dave,
> 
> It looks like this patch didn't make it to the list.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-python-events.patch
Type: text/x-patch
Size: 17402 bytes
Desc: 
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081121/44557fd2/attachment-0001.bin>


More information about the libvir-list mailing list