[libvirt] [PATCH] ESX: Fix DISPATCH_FREE generation code to free all extended objects

Ata Bohra ata.husain at hotmail.com
Sat May 4 01:21:53 UTC 2013


Thanks ! 
 > Date: Wed, 1 May 2013 14:27:08 +0200
> Subject: Re: [libvirt] [PATCH] ESX: Fix DISPATCH_FREE generation code to free all extended objects
> From: matthias.bolte at googlemail.com
> To: ata.husain at hotmail.com
> CC: libvir-list at redhat.com
> 
> 2013/1/2 Ata E Husain Bohra <ata.husain at hotmail.com>:
> > Python code generator "generate_source" section that handles
> > code generation to "free" inherited objects needs to generate
> > DISPATCH_FREE calls for all extended_by objects.
> > ---
> >  src/esx/esx_vi_generator.py |   21 ++++++++++++++++++---
> >  1 file changed, 18 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/esx/esx_vi_generator.py b/src/esx/esx_vi_generator.py
> > index af4e7e8..7a7cf76 100755
> > --- a/src/esx/esx_vi_generator.py
> > +++ b/src/esx/esx_vi_generator.py
> > @@ -4,6 +4,7 @@
> >  # esx_vi_generator.py: generates most of the SOAP type mapping code
> >  #
> >  # Copyright (C) 2010-2012 Matthias Bolte <matthias.bolte at googlemail.com>
> > +# Copyright (C) 2013 Ata E Husain Bohra <ata.husain at hotmail.com>
> >  #
> >  # This library is free software; you can redistribute it and/or
> >  # modify it under the terms of the GNU Lesser General Public
> > @@ -785,9 +786,7 @@ class Object(Type):
> >              source += "ESX_VI__TEMPLATE__DYNAMIC_FREE(%s,\n" % self.name
> >              source += "{\n"
> >
> > -            for extended_by in self.extended_by:
> > -                source += "    ESX_VI__TEMPLATE__DISPATCH__FREE(%s)\n" \
> > -                          % extended_by
> > +            source += recurse_dispatch(self, "ESX_VI__TEMPLATE__DISPATCH__FREE")
> >
> >              source += "},\n"
> >              source += "{\n"
> 
> ACK for the general idea of the fix, but there is already a
> generate_dispatch function that does what you reimplemented in
> recurse_dispatch.
> 
> I removed recurse_dispatch, replaced the call to it with a call to
> generate_dispatch and pushed the result.
> 
> --
> Matthias Bolte
> http://photron.blogspot.com
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130503/953f9339/attachment-0001.htm>


More information about the libvir-list mailing list